summaryrefslogtreecommitdiff
path: root/packages/gsm/files/magician/interpreter-ready.patch
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-03-29 15:39:16 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-03-29 15:39:16 +0000
commitef870450ab6c3d30a7455e19b7552e7ae1d702b2 (patch)
treeb605aaa2dd2773887a4ec111ac99f48dd2df3205 /packages/gsm/files/magician/interpreter-ready.patch
parent01f88920ce441e6532d4264b7903492093f90d4f (diff)
parent036c369555a1f576bb9ebf4bbe960427221bb563 (diff)
merge of '2188b65d5983b40b225a0a4b0a1289b46ad95717'
and '4c365b71ab58cf8ea1b693388693139aebeaabab'
Diffstat (limited to 'packages/gsm/files/magician/interpreter-ready.patch')
-rw-r--r--packages/gsm/files/magician/interpreter-ready.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/gsm/files/magician/interpreter-ready.patch b/packages/gsm/files/magician/interpreter-ready.patch
new file mode 100644
index 0000000000..cc6b9c6e2b
--- /dev/null
+++ b/packages/gsm/files/magician/interpreter-ready.patch
@@ -0,0 +1,47 @@
+Index: gsm/include/gsmd/gsmd.h
+===================================================================
+--- gsm.orig/include/gsmd/gsmd.h 2007-03-29 17:07:10.000000000 +0200
++++ gsm/include/gsmd/gsmd.h 2007-03-29 17:07:43.000000000 +0200
+@@ -58,6 +58,7 @@
+
+ struct gsmd {
+ unsigned int flags;
++ int interpreter_ready;
+ struct gsmd_fd gfd_uart;
+ struct gsmd_fd gfd_sock;
+ struct llparser llp;
+Index: gsm/src/gsmd/atcmd.c
+===================================================================
+--- gsm.orig/src/gsmd/atcmd.c 2007-03-29 17:06:01.000000000 +0200
++++ gsm/src/gsmd/atcmd.c 2007-03-29 17:08:27.000000000 +0200
+@@ -183,6 +183,7 @@
+ * an empty string or that 'ready' string, we need to init the modem */
+ if (strlen(buf) == 0 ||
+ !strcmp(buf, "AT-Command Interpreter ready")) {
++ g->interpreter_ready = 1;
+ gsmd_initsettings(g);
+ return 0;
+ }
+@@ -372,7 +373,7 @@
+ }
+
+ /* write pending commands to UART */
+- if (what & GSMD_FD_WRITE) {
++ if ((what & GSMD_FD_WRITE) && g->interpreter_ready) {
+ struct gsmd_atcmd *pos, *pos2;
+ llist_for_each_entry_safe(pos, pos2, &g->pending_atcmds, list) {
+ len = strlen(pos->buf);
+Index: gsm/src/gsmd/gsmd.c
+===================================================================
+--- gsm.orig/src/gsmd/gsmd.c 2007-03-29 17:06:04.000000000 +0200
++++ gsm/src/gsmd/gsmd.c 2007-03-29 17:08:59.000000000 +0200
+@@ -291,7 +291,8 @@
+
+ gsmd_vendor_plugin_find(&g);
+
+- gsmd_initsettings(&g);
++ if (g.interpreter_ready)
++ gsmd_initsettings(&g);
+
+ gsmd_opname_init(&g);
+