summaryrefslogtreecommitdiff
path: root/gatchat
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-12-02 15:26:56 -0600
committerMarcel Holtmann <marcel@holtmann.org>2009-12-03 02:16:20 +0100
commitbe04d3a32cb5c8d9e2d5bb4b640b720d784600dc (patch)
tree294e965733dd09e874e1e55d31fc680ff076346b /gatchat
parent83bab160484da934e9060cb1cac5215efb0e5269 (diff)
downloadconnman-be04d3a32cb5c8d9e2d5bb4b640b720d784600dc.tar.gz
connman-be04d3a32cb5c8d9e2d5bb4b640b720d784600dc.tar.bz2
connman-be04d3a32cb5c8d9e2d5bb4b640b720d784600dc.zip
Fix: Don't allow cancelation of command id 0
Diffstat (limited to 'gatchat')
-rw-r--r--gatchat/gatchat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index 04995ccc..1dffd89a 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -1192,6 +1192,10 @@ gboolean g_at_chat_cancel(GAtChat *chat, guint id)
if (chat == NULL || chat->command_queue == NULL)
return FALSE;
+ /* We use id 0 for wakeup commands */
+ if (id == 0)
+ return FALSE;
+
l = g_queue_find_custom(chat->command_queue, GUINT_TO_POINTER(id),
at_command_compare_by_id);