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.
This commit is contained in:
Aki Niemi 2011-01-20 12:55:13 +02:00 committed by Marcel Holtmann
parent b7590b08d2
commit 9adc84ea88
1 changed files with 3 additions and 3 deletions

View File

@ -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,