From 247c43566ded9527eac5d1a6e3c9f2afcf02e5f1 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Sun, 1 Apr 2007 08:37:27 +0000 Subject: libgsmd: add interpreter-ready.patch for universal --- packages/gsm/files/interpreter-ready.patch | 47 ++++++++++++++++++++++ .../gsm/files/magician/interpreter-ready.patch | 47 ---------------------- packages/gsm/libgsmd_svn.bb | 1 + 3 files changed, 48 insertions(+), 47 deletions(-) create mode 100644 packages/gsm/files/interpreter-ready.patch delete mode 100644 packages/gsm/files/magician/interpreter-ready.patch (limited to 'packages/gsm') diff --git a/packages/gsm/files/interpreter-ready.patch b/packages/gsm/files/interpreter-ready.patch new file mode 100644 index 0000000000..cc6b9c6e2b --- /dev/null +++ b/packages/gsm/files/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); + diff --git a/packages/gsm/files/magician/interpreter-ready.patch b/packages/gsm/files/magician/interpreter-ready.patch deleted file mode 100644 index cc6b9c6e2b..0000000000 --- a/packages/gsm/files/magician/interpreter-ready.patch +++ /dev/null @@ -1,47 +0,0 @@ -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); - diff --git a/packages/gsm/libgsmd_svn.bb b/packages/gsm/libgsmd_svn.bb index 0b3a29e931..2019185b33 100644 --- a/packages/gsm/libgsmd_svn.bb +++ b/packages/gsm/libgsmd_svn.bb @@ -11,6 +11,7 @@ SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \ file://default" S = "${WORKDIR}/gsm" +SRC_URI_append_htcuniversal = " file://interpreter-ready.patch;patch=1" SRC_URI_append_magician = " file://vendor-tihtc.patch;patch=1 \ file://interpreter-ready.patch;patch=1 \ file://ldisc.patch;patch=1" -- cgit v1.2.3