summaryrefslogtreecommitdiff
path: root/gatchat
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-11-23 19:56:24 -0600
committerMarcel Holtmann <marcel@holtmann.org>2009-11-24 09:12:54 +0100
commit28b30d86b0cf9ab047839bb318721e64284990b8 (patch)
treeb08d8d7c1a62f9f775f72214d1f06300742b5eab /gatchat
parentfc5afc99b7d1e1ffdb51fbb7e9501a907c389bc3 (diff)
downloadconnman-28b30d86b0cf9ab047839bb318721e64284990b8.tar.gz
connman-28b30d86b0cf9ab047839bb318721e64284990b8.tar.bz2
connman-28b30d86b0cf9ab047839bb318721e64284990b8.zip
Fix: Make sure we don't gobble up unsolicited
Diffstat (limited to 'gatchat')
-rw-r--r--gatchat/gatchat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index 320150af..7ec1784c 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -37,6 +37,8 @@
/* #define WRITE_SCHEDULER_DEBUG 1 */
+static const char *none_prefix[] = { NULL };
+
static void g_at_chat_wakeup_writer(GAtChat *chat);
static void debug_chat(GAtChat *chat, gboolean in, const char *str, gsize len);
@@ -827,8 +829,8 @@ static gboolean can_write_data(GIOChannel *channel, GIOCondition cond,
}
if (chat->cmd_bytes_written == 0 && wakeup_first == TRUE) {
- cmd = at_command_create(chat->wakeup, NULL, FALSE, NULL, NULL,
- NULL, NULL);
+ cmd = at_command_create(chat->wakeup, none_prefix, FALSE,
+ NULL, NULL, NULL, NULL);
if (!cmd)
return FALSE;