diff options
author | Jonas Bonn <jonas@southpole.se> | 2017-04-03 14:27:34 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2017-04-03 09:23:53 -0500 |
commit | a722cef201ea080ec62339dc8651f42eb1b8bbdb (patch) | |
tree | e956ad746e157794c4bd136b2473f1eceb125cc1 /src/modem.c | |
parent | 1e39a9d26dcfb4021fc1f1a5332581b62008b914 (diff) | |
download | ofono-a722cef201ea080ec62339dc8651f42eb1b8bbdb.tar.gz |
modem: set_online is valid for AlwaysOnline modems
Calling set_online(TRUE) for an AlwaysOnline modem should succeed; the
modem is, after all, in the requested state when the call returns.
Returning not_implemented is not necessarily wrong, but it's a bit ugly.
Diffstat (limited to 'src/modem.c')
-rw-r--r-- | src/modem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modem.c b/src/modem.c index b1e8d3e2..ac361be0 100644 --- a/src/modem.c +++ b/src/modem.c @@ -754,8 +754,12 @@ static DBusMessage *set_property_online(struct ofono_modem *modem, if (ofono_modem_get_emergency_mode(modem) == TRUE) return __ofono_error_emergency_active(msg); - if (modem_is_always_online(modem) == TRUE) - return __ofono_error_not_implemented(msg); + if (modem_is_always_online(modem) == TRUE) { + if (online) + return dbus_message_new_method_return(msg); + else + return __ofono_error_not_implemented(msg); + } modem->pending = dbus_message_ref(msg); |