mirror of git://git.sysmocom.de/ofono
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:
parent
353d1548bd
commit
2702a2e349
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue