Skip to content

Commit

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

See merge request mer-core/telepathy-ring!14
  • Loading branch information
chriadam committed Jul 13, 2020
2 parents e7f6b0e + 97c94e4 commit c19d480
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modem/call-service.c
Expand Up @@ -1330,7 +1330,7 @@ _modem_call_validate_address (char const *address)
return "invalid service code";

/* Possible dialstring */
m = strspn (address + n, "0123456789abc*#pwPW,.");
m = strspn (address + n, "0123456789abc*#,pwPW");
if (address[n + m] != '\0')
{
if (m == 0)
Expand Down
4 changes: 1 addition & 3 deletions modem/call.c
Expand Up @@ -1034,12 +1034,10 @@ modem_call_send_dtmf (ModemCall *self, char const *dialstring,
case '9':
case '#':
case '*':
case ',':
case '.':
modemstring[i] = dialstring[i];
break;

case 'p': case 'P': modemstring[i] = 'p'; break;
case ',': case 'p': case 'P': modemstring[i] = 'p'; break;
case 'w': case 'W': modemstring[i] = 'w'; break;
case 'a': case 'A': modemstring[i] = 'a'; break;
case 'b': case 'B': modemstring[i] = 'b'; break;
Expand Down
8 changes: 4 additions & 4 deletions src/ring-connection.c
Expand Up @@ -562,7 +562,7 @@ param_filter_isdn(TpCMParamSpec const *paramspec,
str++;

for (len = 0; *str; str++) {
if (strchr(" -()", *str)) /* Skip fillers */
if (strchr(" .-()", *str)) /* Skip fillers */
continue;

if (!strchr("0123456789", *str)) {
Expand Down Expand Up @@ -781,7 +781,7 @@ ring_normalize_contact (char const *input,
if (g_strcasecmp(input, ring_self_handle_name) == 0)
return g_strdup(ring_self_handle_name);

if (strlen(input) == strspn(input, "()- "))
if (strlen(input) == strspn(input, "()-. "))
return g_strdup(""); /* Anonymous */

sos = modem_call_get_valid_emergency_urn(input);
Expand All @@ -796,9 +796,9 @@ ring_normalize_contact (char const *input,
/* Remove usual extra chars like (- ) */
for (i = j = 0; s[i]; i++) {
switch (s[i]) {
case '(': case ')': case '-': case ' ':
case '(': case ')': case '-': case '.': case ' ':
continue;
case 'P': case 'p':
case 'P': case 'p': case ',':
s[j++] = 'p';
break;
case 'W': case 'w':
Expand Down

0 comments on commit c19d480

Please sign in to comment.