projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2effe63
)
Fix modem wakeup handling
author
Denis Kenzior
<denkenz@gmail.com>
Wed, 15 Jul 2009 16:45:17 +0000
(11:45 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Wed, 15 Jul 2009 16:50:04 +0000
(11:50 -0500)
gatchat/gatchat.c
patch
|
blob
|
history
diff --git
a/gatchat/gatchat.c
b/gatchat/gatchat.c
index
32f0b59
..
dfd60d5
100644
(file)
--- a/
gatchat/gatchat.c
+++ b/
gatchat/gatchat.c
@@
-765,6
+765,14
@@
static gboolean received_data(GIOChannel *channel, GIOCondition cond,
static gboolean wakeup_no_response(gpointer user)
{
GAtChat *chat = user;
+ struct at_command *cmd = g_queue_peek_head(chat->command_queue);
+
+ /* Sometimes during startup the modem is still in the ready state
+ * and might acknowledge our 'wakeup' command. In that case don't
+ * timeout the wrong command
+ */
+ if (cmd == NULL || cmd->id != 0)
+ return FALSE;
g_at_chat_finish_command(chat, FALSE, NULL);