diff --git a/inih b/inih index 498f34b..3eda303 160000 --- a/inih +++ b/inih @@ -1 +1 @@ -Subproject commit 498f34b78610cf9e42197d22730c91f942431ea4 +Subproject commit 3eda303b34610adc0554bdea08d02a25668c774c diff --git a/src/ascii_cmd.c b/src/ascii_cmd.c index b91a4b8..df8b168 100644 --- a/src/ascii_cmd.c +++ b/src/ascii_cmd.c @@ -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; diff --git a/src/rds95.c b/src/rds95.c index 3070e9b..88fe350 100644 --- a/src/rds95.c +++ b/src/rds95.c @@ -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);