diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-07-31 07:07:24 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-07-31 07:07:24 +0000 |
commit | 5540e791be5b08fc3f8efcc5daf7c1015e79018c (patch) | |
tree | 9fc091add8c965b634749eba0cb414b41c1744dd /src | |
parent | 35f9fe79b3e87ec5c3be53737f40b09c11d899d4 (diff) |
the latest gsmd sends the alive detector's ATE0 to the GSM modem, even
if interpreter_ready == 0. The attached patch sees to it that if
interpreter_ready is zero, gsmd_alive_start is only called once the
"AT-Command Interpreter ready" message was seen. (Philipp Zabel)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2578 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src')
-rw-r--r-- | src/gsmd/atcmd.c | 1 | ||||
-rw-r--r-- | src/gsmd/gsmd.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index 44e215c..085b382 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -185,6 +185,7 @@ static int ml_parse(const char *buf, int len, void *ctx) !strcmp(buf, "AT-Command Interpreter ready")) { g->interpreter_ready = 1; gsmd_initsettings(g); + gmsd_alive_start(g); return 0; } diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c index 9e2f7d6..eaf1334 100644 --- a/src/gsmd/gsmd.c +++ b/src/gsmd/gsmd.c @@ -128,7 +128,7 @@ static void alive_interval_tmr_cb(struct gsmd_timer *tmr, void *data) gsmd_timer_register(tmr); } -static int gmsd_alive_start(struct gsmd *gsmd) +int gmsd_alive_start(struct gsmd *gsmd) { struct timeval tv; @@ -472,10 +472,11 @@ int main(int argc, char **argv) /* select a vendor plugin */ gsmd_vendor_plugin_find(&g); - if (g.interpreter_ready) + if (g.interpreter_ready) { gsmd_initsettings(&g); - gmsd_alive_start(&g); + gmsd_alive_start(&g); + } gsmd_opname_init(&g); |