summaryrefslogtreecommitdiffstats
path: root/gatchat/gatchat.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-02-01 12:02:38 -0600
committerDenis Kenzior <denkenz@gmail.com>2010-02-01 17:59:28 -0600
commit0767f1dbd8571852c233aa824f2aac56349b7f4f (patch)
tree915cec1bca6edfca77a6e9fc0596ed4e3548b9cf /gatchat/gatchat.c
parente6ccc74504ef671fc75e215ed55cb83f2973f9ee (diff)
downloadofono-0767f1dbd8571852c233aa824f2aac56349b7f4f.tar.bz2
Fix: Check if the command is still pending
Diffstat (limited to 'gatchat/gatchat.c')
-rw-r--r--gatchat/gatchat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index b6550f93..e25bfd6b 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -758,6 +758,9 @@ static gboolean wakeup_no_response(gpointer user)
if (chat->debugf)
chat->debugf("Wakeup got no response\n", chat->debug_data);
+ if (cmd == NULL)
+ return FALSE;
+
g_at_chat_finish_command(chat, FALSE, NULL);
cmd = at_command_create(chat->wakeup, none_prefix, FALSE,
NULL, wakeup_cb, chat, NULL, TRUE);