From: Daniel Wagner <[email protected]>

There are cases where technology->pending_reply is set but the
corresponding technology->pending_timeout not. The technology enabled
was called from the Manager and the device was enabled right away.

connmand[27545]: src/manager.c:enable_technology() conn 0x6a0770
connmand[27545]: src/notifier.c:__connman_notifier_is_registered() type 6
connmand[27545]: src/notifier.c:__connman_notifier_is_enabled() type 6
connmand[27545]: src/technology.c:__connman_technology_enable() type 6 enable
connmand[27545]: src/technology.c:technology_find() type 6
connmand[27545]: src/technology.c:save_state() technology 0x6af570
connmand[27545]: src/storage.c:storage_load() Loading /var/lib/connman/settings
connmand[27545]: src/rfkill.c:__connman_rfkill_block() type 6 block 0
connmand[27545]: src/rfkill.c:rfkill_process()
connmand[27545]: src/rfkill.c:rfkill_process() idx 5 type 5 op 2 soft 0 hard 0
connmand[27545]: src/technology.c:__connman_technology_update_rfkill() index 5 
soft 0 hard 0
connmand[27545]: src/technology.c:technology_find() type 6
connmand[27545]: plugins/ofono.c:cm_changed() path /hso0
connmand[27545]: plugins/ofono.c:update_cm_attached() path /hso0 attached 1
connmand[27545]: plugins/ofono.c:create_device() path /hso0
connmand[27545]: src/device.c:connman_device_create() node 262021007716562 type 
5
connmand[27545]: src/device.c:connman_device_create() device 0x6aaec0
connmand[27545]: src/device.c:connman_device_set_string() device 0x6aaec0 key 
Path value /hso0
connmand[27545]: src/device.c:connman_device_register() device 0x6aaec0 name 
Cellular
connmand[27545]: src/device.c:connman_device_register() driver 0x695d20 name 
modem
connmand[27545]: plugins/ofono.c:modem_probe() device 0x6aaec0
connmand[27545]: src/technology.c:__connman_technology_add_device() device 
0x6aaec0
connmand[27545]: src/notifier.c:__connman_notifier_register() type 6
connmand[27545]: src/technology.c:technology_get() type 6
connmand[27545]: src/technology.c:technology_find() type 6
connmand[27545]: src/technology.c:technology_get() technology 0x6af570
connmand[27545]: src/device.c:__connman_device_enable() device 0x6aaec0
connmand[27545]: plugins/ofono.c:modem_enable() device 0x6aaec0
connmand[27545]: src/device.c:connman_device_set_powered() driver 0x6aaec0 
powered 1
connmand[27545]: src/technology.c:technology_find() type 6
connmand[27545]: src/notifier.c:__connman_notifier_enable() type 6
connmand[27545]: src/notifier.c:technology_enabled() type 6 enabled 1

(connmand:27545): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed
---

Hi,

I'm fixing the symptons with this patch. But I am not sure if the
whole handling of the pending msg is correct. 

cheers,
daniel

 src/technology.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/technology.c b/src/technology.c
index c6fd826..c581791 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -817,10 +817,14 @@ int __connman_technology_enabled(enum 
connman_service_type type)
 
        if (technology->pending_reply != NULL) {
                g_dbus_send_reply(connection, technology->pending_reply, 
DBUS_TYPE_INVALID);
+
                dbus_message_unref(technology->pending_reply);
-               g_source_remove(technology->pending_timeout);
                technology->pending_reply = NULL;
-               technology->pending_timeout = 0;
+
+               if (technology->pending_timeout > 0) {
+                       g_source_remove(technology->pending_timeout);
+                       technology->pending_timeout = 0;
+               }
        }
 
        return 0;
@@ -908,10 +912,14 @@ int __connman_technology_disabled(enum 
connman_service_type type)
 
        if (technology->pending_reply != NULL) {
                g_dbus_send_reply(connection, technology->pending_reply, 
DBUS_TYPE_INVALID);
+
                dbus_message_unref(technology->pending_reply);
-               g_source_remove(technology->pending_timeout);
                technology->pending_reply = NULL;
-               technology->pending_timeout = 0;
+
+               if (technology->pending_timeout > 0) {
+                       g_source_remove(technology->pending_timeout);
+                       technology->pending_timeout = 0;
+               }
        }
 
        if (g_atomic_int_dec_and_test(&technology->enabled) == TRUE) {
-- 
1.7.8.rc0.35.gee6df.dirty

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to