0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 20:33:53 +01:00

remove default device name

This commit is contained in:
2025-08-06 13:44:09 +02:00
parent 09fb504b58
commit cd53471a1e
3 changed files with 9 additions and 5 deletions

2
inih

Submodule inih updated: 498f34b786...3eda303b34

View File

@@ -379,7 +379,7 @@ static void handle_eontp(char *arg, char *pattern, RDSModulator* mod, char* outp
}
static void handle_eonaf(char *arg, char *pattern, RDSModulator* mod, char* output) {
if (arg[0] == '') {
if (arg[0] == 0) {
memset(&(mod->enc->data[mod->enc->program].eon[atoi(pattern)-1].af), 0, sizeof(mod->enc->data[mod->enc->program].eon[atoi(pattern)-1].af));
strcpy(output, "+");
return;

View File

@@ -13,7 +13,6 @@
#include "lib.h"
#include "ascii_cmd.h"
#define RDS_DEVICE "RDS"
#define DEFAULT_CONFIG_PATH "/etc/rds95.conf"
#define DEFAULT_STREAMS 1
#define MAX_STREAMS 4
@@ -64,7 +63,7 @@ typedef struct
{
char control_pipe[51];
uint16_t udp_port;
char rds_device_name[32];
char rds_device_name[48];
uint8_t num_streams;
} RDS95_Config;
@@ -98,7 +97,7 @@ int main(int argc, char **argv) {
RDS95_Config config = {
.control_pipe = "\0",
.udp_port = 0,
.rds_device_name = RDS_DEVICE,
.rds_device_name = "\0",
.num_streams = DEFAULT_STREAMS
};
@@ -141,6 +140,11 @@ int main(int argc, char **argv) {
return res;
}
if(_strnlen(config.rds_device_name, 48) == 0) {
printf("Error: No output device\n");
return 1;
}
printf("Using %d RDS stream(s)\n", config.num_streams);
pthread_attr_init(&attr);