From a0cca0a970fb46fe2a3ee2615271da7d8a60c071 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 15 Feb 2011 14:34:26 -0600 Subject: [PATCH] gatserver: extend D with GSM/UMTS specifics --- gatchat/gatserver.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 6a976dc..b18e888 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -618,6 +618,9 @@ static unsigned int parse_basic_command(GAtServer *server, char *buf) while (buf[i] != '\0' && buf[i] != ';') i += 1; + if (buf[i] == ';') + i += 1; + goto done; } @@ -661,10 +664,13 @@ done: } else /* Handle S-parameter with 100+ */ g_at_server_send_final(server, G_AT_SERVER_RESULT_ERROR); - /* Commands like ATA, ATZ cause the remainder line - * to be ignored. + /* + * Commands like ATA, ATZ cause the remainder linevto be ignored. + * In GSM/UMTS the ATD uses the separator ';' character as a voicecall + * modifier, so we ignore everything coming after that character + * as well. */ - if (prefix[0] == 'A' || prefix[0] == 'Z') + if (prefix[0] == 'A' || prefix[0] == 'Z' || prefix[0] == 'D') return strlen(buf); /* Consume the seperator ';' */ -- 2.7.4