gatchat: fix canceling in progress commands

As g_queue_peek_head() returns the node data field, we have to compare
it against the actual command, not against the pointer to the queue node.
This commit is contained in:
Vinicius Costa Gomes 2010-12-02 17:13:42 -03:00 committed by Denis Kenzior
parent 353d1548bd
commit 2702a2e349
1 changed files with 1 additions and 1 deletions

View File

@ -1060,7 +1060,7 @@ static gboolean at_chat_cancel(struct at_chat *chat, guint group, guint id)
if (c->gid != group)
return FALSE;
if (l == g_queue_peek_head(chat->command_queue) &&
if (c == g_queue_peek_head(chat->command_queue) &&
chat->cmd_bytes_written > 0) {
/* We can't actually remove it since it is most likely
* already in progress, just null out the callback