Fix checking for a compatible radio name.
This commit is contained in:
parent
1add5d94a2
commit
8be79da3e0
6
md380.c
6
md380.c
@ -1373,7 +1373,11 @@ static void md380_parse_parameter(radio_device_t *radio, char *param, char *valu
|
||||
general_settings_t *gs = GET_SETTINGS();
|
||||
|
||||
if (strcasecmp("Radio", param) == 0) {
|
||||
if (strcasecmp(radio->name, value) != 0) {
|
||||
// Accept any of compatible identifiers.
|
||||
if (strcasecmp("TYT MD-380", value) != 0 &&
|
||||
strcasecmp("Zastone D900", value) != 0 &&
|
||||
strcasecmp("Zastone DP880", value) != 0 &&
|
||||
strcasecmp("Radtel RT-27D", value) != 0) {
|
||||
fprintf(stderr, "Bad value for %s: %s\n", param, value);
|
||||
exit(-1);
|
||||
}
|
||||
|
6
uv380.c
6
uv380.c
@ -1466,9 +1466,11 @@ static void uv380_parse_parameter(radio_device_t *radio, char *param, char *valu
|
||||
general_settings_t *gs = GET_SETTINGS();
|
||||
|
||||
if (strcasecmp("Radio", param) == 0) {
|
||||
// Accept either MD-2017 or MD-UV380.
|
||||
// Accept any of compatible identifiers.
|
||||
if (strcasecmp("TYT MD-2017", value) != 0 &&
|
||||
strcasecmp("TYT MD-UV380", value) != 0) {
|
||||
strcasecmp("TYT MD-UV380", value) != 0 &&
|
||||
strcasecmp("TYT MD-UV390", value) != 0 &&
|
||||
strcasecmp("TYT MD-9600", value) != 0) {
|
||||
fprintf(stderr, "Bad value for %s: %s\n", param, value);
|
||||
exit(-1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user