r1313 - trunk/src/target/gsm/src/gsmd
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Sat Mar 10 03:21:29 CET 2007
Author: laforge
Date: 2007-03-10 03:21:28 +0100 (Sat, 10 Mar 2007)
New Revision: 1313
Modified:
trunk/src/target/gsm/src/gsmd/atcmd.c
Log:
* deal correctly with 'gsm power cycling'
* consider % as prefix for extended response, even though non-standard
Modified: trunk/src/target/gsm/src/gsmd/atcmd.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/atcmd.c 2007-03-10 01:42:26 UTC (rev 1312)
+++ trunk/src/target/gsm/src/gsmd/atcmd.c 2007-03-10 02:21:28 UTC (rev 1313)
@@ -176,8 +176,11 @@
int rc = 0, final = 0;
DEBUGP("buf=`%s'(%d)\n", buf, len);
-
- if (!strcmp(buf, "AT-Command Interpreter ready")) {
+
+ /* FIXME: This needs to be part of the vendor plugin. If we receive
+ * an empty string or that 'ready' string, we need to init the modem */
+ if (strlen(buf) == 0 ||
+ !strcmp(buf, "AT-Command Interpreter ready")) {
gsmd_initsettings(g);
return 0;
}
@@ -239,7 +242,7 @@
}
if (cmd) {
- if (cmd->buf[2] != '+') {
+ if (cmd->buf[2] != '+' && cmd->buf[2] != '%') {
gsmd_log(GSMD_ERROR, "extd reply to non-extd command?\n");
return -EINVAL;
}
More information about the commitlog
mailing list