Send commitlog mailing list submissions to
        [EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r1766 - trunk/src/target/gsm/src/gsmd ([EMAIL PROTECTED])
--- Begin Message ---
Author: laforge
Date: 2007-04-15 11:57:12 +0200 (Sun, 15 Apr 2007)
New Revision: 1766

Modified:
   trunk/src/target/gsm/src/gsmd/atcmd.c
Log:
parse numeric responses for RING, NO CARRIER and BUSY (Philip Zabel)


Modified: trunk/src/target/gsm/src/gsmd/atcmd.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/atcmd.c       2007-04-15 09:47:23 UTC (rev 
1765)
+++ trunk/src/target/gsm/src/gsmd/atcmd.c       2007-04-15 09:57:12 UTC (rev 
1766)
@@ -269,7 +269,8 @@
                        memcpy(cmd->buf, buf, len);
                }
        } else {
-               if (!strcmp(buf, "RING")) {
+               if (!strcmp(buf, "RING") ||
+                   ((g->flags & GSMD_FLAG_V0) && buf[0] == '2')) {
                        /* this is the only non-extended unsolicited return
                         * code, part of Case 'B' */
                        return unsolicited_parse(g, buf, len, NULL);
@@ -285,8 +286,8 @@
                        goto final_cb;
                }
 
-               if (!strncmp(buf, "OK", 2)
-                   || ((g->flags & GSMD_FLAG_V0) && buf[0] == '0')) {
+               if (!strncmp(buf, "OK", 2) ||
+                   ((g->flags & GSMD_FLAG_V0) && buf[0] == '0')) {
                        /* Part of Case 'C' */
                        if (cmd)
                                cmd->ret = 0;
@@ -296,13 +297,15 @@
 
                /* FIXME: handling of those special commands in response to
                 * ATD / ATA */
-               if (!strncmp(buf, "NO CARRIER", 11)) {
+               if (!strncmp(buf, "NO CARRIER", 11) ||
+                   ((g->flags & GSMD_FLAG_V0) && buf[0] == '3')) {
                        /* Part of Case 'D' */
                        final = 1;
                        goto final_cb;
                }
 
-               if (!strncmp(buf, "BUSY", 4)) {
+               if (!strncmp(buf, "BUSY", 4) ||
+                   ((g->flags & GSMD_FLAG_V0) && buf[0] == '7')) {
                        /* Part of Case 'D' */
                        final = 1;
                        goto final_cb;




--- End Message ---
_______________________________________________
commitlog mailing list
[EMAIL PROTECTED]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to