diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2011-03-18 20:39:47 -0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-03-21 14:03:28 -0500 |
commit | 47ee31420098777d8cdf3109bf25fbf67b2bbfa0 (patch) | |
tree | ea77779db1efbf239b7cbf4de2564c79d4dbbf8d /src/voicecall.c | |
parent | 15abdeee68ca66b49092a25f08796fa037591583 (diff) | |
download | ofono-47ee31420098777d8cdf3109bf25fbf67b2bbfa0.tar.bz2 |
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.
Diffstat (limited to 'src/voicecall.c')
-rw-r--r-- | src/voicecall.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/voicecall.c b/src/voicecall.c index cb5258de..4932ffa4 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -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) |