diff --git a/targets/RT/USER/rrh_gw.c b/targets/RT/USER/rrh_gw.c index 3def754e3d4fd71d71afab49f7897a3cec9453fa..8084644b853e0b538968bedba3d40f625824344b 100644 --- a/targets/RT/USER/rrh_gw.c +++ b/targets/RT/USER/rrh_gw.c @@ -299,11 +299,17 @@ static void get_options(int argc, char *argv[]) { loopback_flag=1; break; case 'f': - if (strlen(optarg)<=1024) - strcpy(rf_config_file,optarg); - else { - printf("Configuration filename is too long\n"); - exit(-1); + if (optarg){ + if ((strcmp("null", optarg) == 0) || (strcmp("NULL", optarg) == 0)) { + printf("no configuration filename is provided\n"); + } + else if (strlen(optarg)<=1024){ + // rf_config_file = strdup(optarg); + strcpy(rf_config_file,optarg); + }else { + printf("Configuration filename is too long\n"); + exit(-1); + } } break; case 't':