* [PATCH] Keep modem state consistent if sim is removed while online is being changed.
@ 2010-05-27 16:29 Pekka Pessi
2010-05-27 17:47 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Pekka Pessi @ 2010-05-27 16:29 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]
---
src/modem.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/modem.c b/src/modem.c
index 2cb3e50..0fa8a67 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -410,14 +410,16 @@ static void online_cb(const struct ofono_error *error, void *data)
struct ofono_modem *modem = data;
DBusMessage *reply;
- if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
+ if (error->type == OFONO_ERROR_TYPE_NO_ERROR &&
+ modem->modem_state == MODEM_STATE_OFFLINE)
reply = dbus_message_new_method_return(modem->pending);
else
reply = __ofono_error_failed(modem->pending);
__ofono_dbus_pending_reply(&modem->pending, reply);
- if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
+ if (error->type == OFONO_ERROR_TYPE_NO_ERROR &&
+ modem->modem_state == MODEM_STATE_OFFLINE)
modem_change_state(modem, MODEM_STATE_ONLINE);
}
@@ -433,7 +435,8 @@ static void offline_cb(const struct ofono_error *error, void *data)
__ofono_dbus_pending_reply(&modem->pending, reply);
- if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
+ if (error->type == OFONO_ERROR_TYPE_NO_ERROR &&
+ modem->modem_state == MODEM_STATE_ONLINE)
modem_change_state(modem, MODEM_STATE_OFFLINE);
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Keep modem state consistent if sim is removed while online is being changed.
2010-05-27 16:29 [PATCH] Keep modem state consistent if sim is removed while online is being changed Pekka Pessi
@ 2010-05-27 17:47 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2010-05-27 17:47 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
Hi Pekka,
> ---
> src/modem.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/modem.c b/src/modem.c
> index 2cb3e50..0fa8a67 100644
Patch has been applied, but remember to keep the commit header to 50
characters. I fixed it for you this time ;)
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-27 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27 16:29 [PATCH] Keep modem state consistent if sim is removed while online is being changed Pekka Pessi
2010-05-27 17:47 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.