A SetProperty that doesn't actually change the Online property's state
when no change to that state is pending, should not fail. It should
always succeed regardless of the current modem state.
---
 src/modem.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modem.c b/src/modem.c
index f587766..e966a6e 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -580,15 +580,15 @@ static DBusMessage *set_property_online(struct 
ofono_modem *modem,
        if (modem->pending != NULL)
                return __ofono_error_busy(msg);
 
+       if (modem->online == online)
+               return dbus_message_new_method_return(msg);
+
        if (driver->set_online == NULL)
                return __ofono_error_not_implemented(msg);
 
        if (modem->modem_state < MODEM_STATE_OFFLINE)
                return __ofono_error_not_available(msg);
 
-       if (modem->online == online)
-               return dbus_message_new_method_return(msg);
-
        modem->pending = dbus_message_ref(msg);
 
        driver->set_online(modem, online,
-- 
1.7.1

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to