summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormickey <mickey@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-08-19 20:20:54 +0000
committermickey <mickey@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-08-19 20:20:54 +0000
commitdaf6af8bad886017edde8e7a6ee86b676e758185 (patch)
tree7cd0496fcdd68e56535e3a903c709dd196f6f718
parent7eb970a1b1ce196f8f7b56f16c761d5c78fbaa32 (diff)
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
-rw-r--r--src/gsmd/gsmd.c7
1 files changed, 5 insertions, 2 deletions
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;
personal git repositories of Harald Welte. Your mileage may vary