summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAki Niemi <aki.niemi@nokia.com>2011-01-20 12:55:13 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-01-20 12:23:25 +0100
commit9adc84ea882cf3d64a19c2469d616a8ff006927d (patch)
treec78f5e467d7a52cdb0fd7eb5e920836381232eee /src
parentb7590b08d253dc762a058fbdf2480757a6ff9af1 (diff)
downloadofono-9adc84ea882cf3d64a19c2469d616a8ff006927d.tar.bz2
core: Always return success to a no-op
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.
Diffstat (limited to 'src')
-rw-r--r--src/modem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modem.c b/src/modem.c
index f587766c..e966a6e4 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,