ZMQ module uses default base srate

This commit is contained in:
Xavier Arteaga 2020-04-27 13:02:55 +02:00 committed by Andre Puschmann
parent 1bbf1caabc
commit 28b2a69c8a
2 changed files with 13 additions and 4 deletions

View File

@ -100,7 +100,12 @@ static inline int parse_double(char* args, const char* config_arg_base, int chan
{
char tmp_value[RF_PARAM_LEN] = {0};
int ret = parse_string(args, config_arg_base, channel_index, tmp_value);
// Copy parsed value only if was found, otherwise it keeps the default
if (ret == SRSLTE_SUCCESS) {
*value = strtod(tmp_value, NULL);
}
return ret;
}
@ -108,7 +113,11 @@ static inline int parse_uint32(char* args, const char* config_arg_base, int chan
{
double tmp_value;
int ret = parse_double(args, config_arg_base, channel_index, &tmp_value);
// Copy parsed value only if was found, otherwise it keeps the default
if (ret == SRSLTE_SUCCESS) {
*value = tmp_value;
}
return ret;
}