mirror of git://git.sysmocom.de/ofono
voicecall: Fix pause character validation
manager_tone() converts all tone chars to uppercase. Since everywhere we check for both 'p' and 'P' for a pause, tone_queue() should also check both before claiming the string is invalid.
This commit is contained in:
parent
15abdeee68
commit
47ee314200
|
@ -287,8 +287,9 @@ static int tone_queue(struct ofono_voicecall *vc, const char *tone_str,
|
|||
*/
|
||||
for (i = 0; tone_str[i]; i++)
|
||||
if (!g_ascii_isdigit(tone_str[i]) && tone_str[i] != 'p' &&
|
||||
tone_str[i] != '*' && tone_str[i] != '#' &&
|
||||
(tone_str[i] < 'A' || tone_str[i] > 'D'))
|
||||
tone_str[i] != 'P' && tone_str[i] != '*' &&
|
||||
tone_str[i] != '#' && (tone_str[i] < 'A' ||
|
||||
tone_str[i] > 'D'))
|
||||
return -EINVAL;
|
||||
|
||||
while ((entry = g_queue_peek_nth(vc->toneq, n++)) != NULL)
|
||||
|
|
Loading…
Reference in New Issue