diff options
author | tick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-10-25 11:53:03 +0000 |
---|---|---|
committer | tick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-10-25 11:53:03 +0000 |
commit | bd3f1498ccd05a9aac192f84bf3f40189ff3a0d6 (patch) | |
tree | 3eef8200b89bab0faa61b58857290d8cfd7c0919 /src/gsmd/atcmd.c | |
parent | b8b0521b4e9e021600411182f0b0b9a4e7f7c284 (diff) |
handle CME and CMS errors (Erin Yueh)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3267 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/gsmd/atcmd.c')
-rw-r--r-- | src/gsmd/atcmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index 2ef6a10..69e1d12 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -206,6 +206,7 @@ static int ml_parse(const char *buf, int len, void *ctx) struct gsmd_atcmd *cmd = NULL; int rc = 0; int cme_error = 0; + int cms_error = 0; DEBUGP("buf=`%s'(%d)\n", buf, len); @@ -269,6 +270,7 @@ static int ml_parse(const char *buf, int len, void *ctx) DEBUGP("error number %lu\n", err_nr); if (cmd) cmd->ret = err_nr; + cms_error = 1; goto final_cb; } @@ -399,6 +401,9 @@ final_cb: if (cmd && cme_error) generate_event_from_cme(g, cmd->ret); + + if (cmd && cms_error) + generate_event_from_cms(g, cmd->ret); if (!cmd->cb) { gsmd_log(GSMD_NOTICE, "command without cb!!!\n"); |