diff options
| author | Shane Volpe <shanevolpe@gmail.com> | 2007-04-07 20:23:43 +0000 |
|---|---|---|
| committer | Shane Volpe <shanevolpe@gmail.com> | 2007-04-07 20:23:43 +0000 |
| commit | 3a5e5c11ca9e5d3686fce546e33eacc62f5e7dcd (patch) | |
| tree | 4f25aacf8558a773fad14e0018d4afb9f560237f /packages/gsm/files/numeric.patch | |
| parent | 1ff6665ead8253bb6adde2afeb004f9ef625f4f4 (diff) | |
| parent | 2effa2e0213c0cecaf6d3a0ca7390a288ebc9908 (diff) | |
merge of '59b19c7d48e754418caf1f4214b1ce53d2cca5c4'
and 'f4a044e0ef8b886ef1bdc74ae09f12874ddf7130'
Diffstat (limited to 'packages/gsm/files/numeric.patch')
| -rw-r--r-- | packages/gsm/files/numeric.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/packages/gsm/files/numeric.patch b/packages/gsm/files/numeric.patch new file mode 100644 index 0000000000..cd1990cbe5 --- /dev/null +++ b/packages/gsm/files/numeric.patch @@ -0,0 +1,56 @@ +Index: gsm/src/gsmd/atcmd.c +=================================================================== +--- gsm.orig/src/gsmd/atcmd.c 2007-04-02 09:59:16.000000000 +0200 ++++ gsm/src/gsmd/atcmd.c 2007-04-02 10:10:54.000000000 +0200 +@@ -207,7 +207,7 @@ + * TBD + */ + +- if (buf[0] == '+' || buf[0] == '%') { ++ if (buf[0] == '+' || buf[0] == '%' || buf[0] == '@') { + /* an extended response */ + const char *colon = strchr(buf, ':'); + if (!colon) { +@@ -269,14 +269,13 @@ + memcpy(cmd->buf, buf, len); + } + } else { +- if (!strcmp(buf, "RING")) { ++ if (!strcmp(buf, "RING") || buf[0] == '2') { + /* this is the only non-extended unsolicited return + * code, part of Case 'B' */ + return unsolicited_parse(g, buf, len, NULL); + } + +- if (!strcmp(buf, "ERROR") || +- ((g->flags & GSMD_FLAG_V0) && buf[0] == '4')) { ++ if (!strcmp(buf, "ERROR") || buf[0] == '4') { + /* Part of Case 'C' */ + DEBUGP("unspecified error\n"); + if (cmd) +@@ -285,8 +284,7 @@ + goto final_cb; + } + +- if (!strncmp(buf, "OK", 2) +- || ((g->flags & GSMD_FLAG_V0) && buf[0] == '0')) { ++ if (!strncmp(buf, "OK", 2) || buf[0] == '0') { + /* Part of Case 'C' */ + if (cmd) + cmd->ret = 0; +@@ -296,13 +294,13 @@ + + /* FIXME: handling of those special commands in response to + * ATD / ATA */ +- if (!strncmp(buf, "NO CARRIER", 11)) { ++ if (!strncmp(buf, "NO CARRIER", 11) || buf[0] == '3') { + /* Part of Case 'D' */ + final = 1; + goto final_cb; + } + +- if (!strncmp(buf, "BUSY", 4)) { ++ if (!strncmp(buf, "BUSY", 4) || buf[0] == '7') { + /* Part of Case 'D' */ + final = 1; + goto final_cb; |
