gatserver: extend D with GSM/UMTS specifics

This commit is contained in:
Denis Kenzior 2011-02-15 14:34:26 -06:00
parent 5da299ad34
commit a0cca0a970
1 changed files with 9 additions and 3 deletions

View File

@ -618,6 +618,9 @@ static unsigned int parse_basic_command(GAtServer *server, char *buf)
while (buf[i] != '\0' && buf[i] != ';') while (buf[i] != '\0' && buf[i] != ';')
i += 1; i += 1;
if (buf[i] == ';')
i += 1;
goto done; goto done;
} }
@ -661,10 +664,13 @@ done:
} else /* Handle S-parameter with 100+ */ } else /* Handle S-parameter with 100+ */
g_at_server_send_final(server, G_AT_SERVER_RESULT_ERROR); 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); return strlen(buf);
/* Consume the seperator ';' */ /* Consume the seperator ';' */