diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-06-02 11:00:07 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-06-02 11:00:07 +0000 |
commit | 1c1d1d68d245ee7ac99d7a553a692c6c3983766e (patch) | |
tree | c3e7694da4bd90df2f2209d9dfea27feb766454d /src/gsmd/atcmd.c | |
parent | 25d5ef89ffc6dfa3eae3af33c335aa6bfec795a4 (diff) |
add machine / vendor plugin infrastructure (Philip Zabel)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2123 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/gsmd/atcmd.c')
-rw-r--r-- | src/gsmd/atcmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index 27c0a41..4df12dc 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -183,6 +183,7 @@ static int ml_parse(const char *buf, int len, void *ctx) * an empty string or that 'ready' string, we need to init the modem */ if (strlen(buf) == 0 || !strcmp(buf, "AT-Command Interpreter ready")) { + g->interpreter_ready = 1; gsmd_initsettings(g); return 0; } @@ -375,7 +376,7 @@ static int atcmd_select_cb(int fd, unsigned int what, void *data) } /* write pending commands to UART */ - if (what & GSMD_FD_WRITE) { + if ((what & GSMD_FD_WRITE) && g->interpreter_ready) { struct gsmd_atcmd *pos, *pos2; llist_for_each_entry_safe(pos, pos2, &g->pending_atcmds, list) { len = strlen(pos->buf); |