diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-03-10 02:21:28 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-03-10 02:21:28 +0000 |
commit | a831d70619f614254692b75c1aca39f21c15fb55 (patch) | |
tree | 437a773caa6203cca1479c7adaaf8d1f03467d33 /src | |
parent | 0b07830f6fda2c6b8d3808b3e3a2dbd6d2199662 (diff) |
* deal correctly with 'gsm power cycling'
* consider % as prefix for extended response, even though non-standard
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@1313 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src')
-rw-r--r-- | src/gsmd/atcmd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index cc5d891..11e9251 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -176,8 +176,11 @@ static int ml_parse(const char *buf, int len, void *ctx) int rc = 0, final = 0; DEBUGP("buf=`%s'(%d)\n", buf, len); - - if (!strcmp(buf, "AT-Command Interpreter ready")) { + + /* FIXME: This needs to be part of the vendor plugin. If we receive + * an empty string or that 'ready' string, we need to init the modem */ + if (strlen(buf) == 0 || + !strcmp(buf, "AT-Command Interpreter ready")) { gsmd_initsettings(g); return 0; } @@ -239,7 +242,7 @@ static int ml_parse(const char *buf, int len, void *ctx) } if (cmd) { - if (cmd->buf[2] != '+') { + if (cmd->buf[2] != '+' && cmd->buf[2] != '%') { gsmd_log(GSMD_ERROR, "extd reply to non-extd command?\n"); return -EINVAL; } |