diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-01-19 11:24:16 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-20 02:21:28 +0100 |
commit | 1cb80dc2f268a341938430dfe135030c0a9f6ce5 (patch) | |
tree | 1695aba38c96f91f2258c8a0fa4deebc424ec0ed | |
parent | 3a0da17f08d6f6d29eef055ac1dda8cd498bc866 (diff) | |
download | connman-1cb80dc2f268a341938430dfe135030c0a9f6ce5.tar.gz connman-1cb80dc2f268a341938430dfe135030c0a9f6ce5.tar.bz2 connman-1cb80dc2f268a341938430dfe135030c0a9f6ce5.zip |
ofono: Cancel pending SetProperty
If the cellular technolgy is disabled while ConnMan is connected
to a cellular network, the plugin gets first a network_disconnect()
call and shortly after that a modem_disable(). network_disconnect()
will set org.ofono.ConnectionContext.Active to false while this call
is pending modem_disable() tries to set org.ofono.Modem.Online to false.
There is no point in waiting for the first call to succeed or fail.
Just cancel it and set the modem offline.
Fixes BMC#24651.
-rw-r--r-- | plugins/ofono.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c index c9a3256d..f15c36d0 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -338,8 +338,10 @@ static int set_property(struct modem_data *modem, DBG("%s path %s %s.%s", modem->path, path, interface, property); if (modem->call_set_property != NULL) { - connman_error("Pending SetProperty"); - return -EBUSY; + DBG("Cancel pending SetProperty"); + + dbus_pending_call_cancel(modem->call_set_property); + modem->call_set_property = NULL; } message = dbus_message_new_method_call(OFONO_SERVICE, path, |