diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-12-02 15:26:56 -0600 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-03 02:16:20 +0100 |
commit | be04d3a32cb5c8d9e2d5bb4b640b720d784600dc (patch) | |
tree | 294e965733dd09e874e1e55d31fc680ff076346b /gatchat | |
parent | 83bab160484da934e9060cb1cac5215efb0e5269 (diff) | |
download | connman-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.c | 4 |
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); |