Skip to content

Commit

Permalink
Merge branch 'jb50214' into 'master'
Browse files Browse the repository at this point in the history
[ofono] Don't support '.' as a DTMF pause character. Contributes to JB#50214

See merge request mer-core/ofono!271
  • Loading branch information
chriadam committed Jul 13, 2020
2 parents 1366e42 + 2ee5e4c commit 4e067fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ofono/src/voicecall.c
Expand Up @@ -349,12 +349,12 @@ static int tone_queue(struct ofono_voicecall *vc, const char *tone_str,

/*
* Tones can be 0-9, *, #, A-D according to 27.007 C.2.11,
* and p for Pause.
* and p for Pause (also , for Pause as per ITU-T V.250 6.3.1.2).
*/
for (i = 0; tone_str[i]; i++)
if (!g_ascii_isdigit(tone_str[i]) && tone_str[i] != 'p' &&
tone_str[i] != 'P' && tone_str[i] != '*' &&
tone_str[i] != '.' && tone_str[i] != ',' &&
tone_str[i] != ',' &&
tone_str[i] != '#' && (tone_str[i] < 'A' ||
tone_str[i] > 'D'))
return -EINVAL;
Expand Down Expand Up @@ -4389,7 +4389,7 @@ static void tone_request_cb(const struct ofono_error *error, void *data)
goto done;
}

len = strspn(entry->left, "pP.,");
len = strspn(entry->left, "pP,");
entry->left += len;

done:
Expand Down Expand Up @@ -4423,7 +4423,7 @@ static gboolean tone_request_run(gpointer user_data)
if (entry == NULL)
return FALSE;

len = strcspn(entry->left, "pP.,");
len = strcspn(entry->left, "pP,");

if (len) {
if (len > 8) /* Arbitrary length limit per request */
Expand Down

0 comments on commit 4e067fa

Please sign in to comment.