summaryrefslogtreecommitdiff
path: root/gatchat/gatchat.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2010-12-02 17:13:42 -0300
committerDenis Kenzior <denkenz@gmail.com>2010-12-07 12:16:20 -0600
commit2702a2e34974bfdba3e5d302017ac016236ff1c0 (patch)
tree1b5568af93acfb338ac6f849ad9105fa46605657 /gatchat/gatchat.c
parent353d1548bdd1b417b09d69bfe5dac61c8a8a3c25 (diff)
downloadofono-2702a2e34974bfdba3e5d302017ac016236ff1c0.tar.gz
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.
Diffstat (limited to 'gatchat/gatchat.c')
-rw-r--r--gatchat/gatchat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index d82a02ea..96da6571 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -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