From 1c1d1d68d245ee7ac99d7a553a692c6c3983766e Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 2 Jun 2007 11:00:07 +0000 Subject: add machine / vendor plugin infrastructure (Philip Zabel) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2123 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/atcmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gsmd/atcmd.c') 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); -- cgit v1.2.3