From 1cb80dc2f268a341938430dfe135030c0a9f6ce5 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Thu, 19 Jan 2012 11:24:16 +0100 Subject: [PATCH] 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. --- plugins/ofono.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index c9a3256..f15c36d 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, -- 2.7.4