mirror of git://git.sysmocom.de/ofono
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:
parent
b7590b08d2
commit
9adc84ea88
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue