mirror of git://git.sysmocom.de/ofono
Fix modem wakeup handling
This commit is contained in:
parent
2effe63667
commit
3dcf25807a
|
@ -765,6 +765,14 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
|
||||||
static gboolean wakeup_no_response(gpointer user)
|
static gboolean wakeup_no_response(gpointer user)
|
||||||
{
|
{
|
||||||
GAtChat *chat = 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);
|
g_at_chat_finish_command(chat, FALSE, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue