From daf6af8bad886017edde8e7a6ee86b676e758185 Mon Sep 17 00:00:00 2001 From: mickey Date: Sun, 19 Aug 2007 20:20:54 +0000 Subject: gsmd: also allow ERROR as answer for the alive timer. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2742 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/gsmd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gsmd') diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c index b7761cc..dc61e2c 100644 --- a/src/gsmd/gsmd.c +++ b/src/gsmd/gsmd.c @@ -52,7 +52,10 @@ static struct gsmd g; static int daemonize = 0; -/* alive checking */ +/* alive checking + * either OK or ERROR is allowed since, both mean the modem still responds + */ + struct gsmd_alive_priv { struct gsmd *gsmd; @@ -63,7 +66,7 @@ static int gsmd_alive_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp) { struct gsmd_alive_priv *alp = ctx; - if (!strcmp(resp, "OK") || + if (!strcmp(resp, "OK") || !strcmp(resp, "ERROR") || ((alp->gsmd->flags & GSMD_FLAG_V0) && resp[0] == '0')) alp->alive_responded = 1; return 0; -- cgit v1.2.3