Fix: Don't allow cancelation of command id 0

This commit is contained in:
Denis Kenzior 2009-12-02 15:26:56 -06:00
parent ab4e631c98
commit 0d022d3057
1 changed files with 4 additions and 0 deletions

View File

@ -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);