r2742 - trunk/src/target/gsm/src/gsmd

mickey at sita.openmoko.org mickey at sita.openmoko.org
Sun Aug 19 22:20:54 CEST 2007


Author: mickey
Date: 2007-08-19 22:20:54 +0200 (Sun, 19 Aug 2007)
New Revision: 2742

Modified:
   trunk/src/target/gsm/src/gsmd/gsmd.c
Log:
gsmd: also allow ERROR as answer for the alive timer.


Modified: trunk/src/target/gsm/src/gsmd/gsmd.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/gsmd.c	2007-08-19 17:36:16 UTC (rev 2741)
+++ trunk/src/target/gsm/src/gsmd/gsmd.c	2007-08-19 20:20:54 UTC (rev 2742)
@@ -52,8 +52,11 @@
 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;
 	int alive_responded;
@@ -63,7 +66,7 @@
 {
 	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;





More information about the commitlog mailing list