[RFC] ignore echo in ml_parse
Philipp Zabel
philipp.zabel at gmail.com
Sun Jun 3 16:17:23 CEST 2007
Hi,
with the current gsmd, on HTC Magician the first synchronous command
submitted by gsmd_initsettings ("ATE0V1") fails because the answer
returned is something like "ATE0V1\rOK\r", ml_parse gets called with
"ATE0V1" first and the callback checks for "OK" and thus fails.
The attached patch makes gsmd always ignore received strings that are
identical to the sent command. This might not be the best fix for the
problem at hand - any hints?
cheers
Philipp
Index: gsm/src/gsmd/atcmd.c
===================================================================
--- gsm.orig/src/gsmd/atcmd.c 2007-06-03 16:06:27.000000000 +0200
+++ gsm/src/gsmd/atcmd.c 2007-06-03 16:06:30.000000000 +0200
@@ -195,6 +195,11 @@
cmd = llist_entry(g->busy_atcmds.next,
struct gsmd_atcmd, list);
+ if (cmd && !strcmp(buf, cmd->buf)) {
+ DEBUGP("ignoring echo\n");
+ return 0;
+ }
+
/* we have to differentiate between the following cases:
*
* A) an information response ("+whatever: ...")
More information about the gsmd-devel
mailing list