Hi,

I was wondering why the Manager object does not send a "offline"
StateChanged signal when I disconnect my only online service (in my
case ethernet).

connmand[13256]: Enabling DNS server 192.168.100.4
connmand[13256]: Enabling DNS server 192.168.100.1
connmand[13256]: Removing DNS server 192.168.100.4
connmand[13256]: Removing DNS server 192.168.100.1
connmand[13256]: Adding DNS server 192.168.100.4
connmand[13256]: Adding DNS server 192.168.100.1
connmand[13256]: src/notifier.c:__connman_notifier_connect() type 2
connmand[13256]: Enabling DNS server 192.168.100.4
connmand[13256]: Enabling DNS server 192.168.100.1
connmand[13256]: Disabling DNS server 192.168.100.4
connmand[13256]: Disabling DNS server 192.168.100.1
connmand[13256]: Removing DNS server 192.168.100.4
connmand[13256]: Removing DNS server 192.168.100.1
connmand[13256]: src/notifier.c:__connman_notifier_disconnect() type 2

 From the log files I saw that
__connman_notifier_connect() is called just in front of the
__connman_notifier_disconnect(). __connman_notifer_connect() will
increase the count of all the technologies before it decreases it in
__connman_notifier_disconnect() again. So the this is more or less a
no op. Therefore I never see StateChaned from online to offline.

gdb) bt full
#0  __connman_notifier_connect (type=CONNMAN_SERVICE_TYPE_ETHERNET) at 
src/notifier.c:311
        __connman_debug_desc = {name = 0x0, file = 0x475cc0 "src/notifier.c", 
flags = 1}
        __FUNCTION__ = "__connman_notifier_connect"
#1  0x000000000044245f in __connman_service_indicate_state (service=0x6ab6c0, 
new_state=
    CONNMAN_SERVICE_STATE_DISCONNECT, type=CONNMAN_IPCONFIG_TYPE_IPV4) at 
src/service.c:3563
        proxy_config = CONNMAN_SERVICE_PROXY_METHOD_UNKNOWN
        method = CONNMAN_IPCONFIG_METHOD_UNKNOWN
        service_state = CONNMAN_SERVICE_STATE_ONLINE
        state = CONNMAN_SERVICE_STATE_READY
        iter = 0x0
        __FUNCTION__ = "__connman_service_indicate_state"
#2  0x0000000000436fb8 in set_connected (user_data=0x6afef0) at 
src/network.c:926
        service = 0x6ab6c0
        network = 0x6afef0
        service = 0x6ab6c0
        ipconfig_ipv4 = 0x6adab0
        ipconfig_ipv6 = 0x6b8280
        ipv4_method = CONNMAN_IPCONFIG_METHOD_DHCP
        ipv6_method = CONNMAN_IPCONFIG_METHOD_AUTO
        __FUNCTION__ = "set_connected"
#3  0x00000000004370f7 in connman_network_set_connected (network=0x6afef0, 
connected=0)
    at src/network.c:979
        __FUNCTION__ = "connman_network_set_connected"
#4  0x000000000043737c in __connman_network_disconnect (network=0x6afef0) at 
src/network.c:1084
        err = 0
        __FUNCTION__ = "__connman_network_disconnect"
#5  0x0000000000442fe8 in __connman_service_disconnect (service=0x6ab6c0) at 
src/service.c:3942
        err = 0
        __FUNCTION__ = "__connman_service_disconnect"
#6  0x0000000000440de0 in disconnect_service (conn=0x69b6f0, msg=0x69e9e0, 
user_data=0x6ab6c0)
    at src/service.c:2807
        service = 0x6ab6c0
        err = 32767
        __FUNCTION__ = "disconnect_service"
#7  0x000000000040f473 in process_message (connection=0x69b6f0, 
message=0x69e9e0, method=
    0x692f60, iface_user_data=0x6ab6c0) at gdbus/object.c:224
        reply = 0x471300
#8  0x000000000040fb7a in generic_message (connection=0x69b6f0, 
message=0x69e9e0, user_data=
    0x6a7720) at gdbus/object.c:448
        data = 0x6a7720
        iface = 0x6afc70
        method = 0x692f60
        interface = 0x6a6598 "net.connman.Service"
#9  0x000000310841de11 in _dbus_object_tree_dispatch_and_unlock (tree=0x69b3a0, 
message=
    0x69e9e0) at dbus-object-tree.c:858
        message_function = 0x40fa8a <generic_message>
        user_data = <value optimized out>
        next = 0x0
        path = 0x6ab480
        exact_match = 0
        list = 0x69e4d8
        link = <value optimized out>
        result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED
        subtree = <value optimized out>
#10 0x000000310840fbe2 in dbus_connection_dispatch (connection=0x69b6f0)
    at dbus-connection.c:4691
        message = 0x69e9e0
        link = <value optimized out>
        filter_list_copy = 0x0
        message_link = 0x69e538
        result = <value optimized out>
        pending = <value optimized out>
        reply_serial = <value optimized out>
        status = <value optimized out>
        __FUNCTION__ = "dbus_connection_dispatch"
#11 0x000000000040d00b in message_dispatch (data=0x69b6f0) at 
gdbus/mainloop.c:80
        conn = 0x69b6f0
#12 0x00000031078435eb in g_timeout_dispatch (source=<value optimized out>, 
    callback=<value optimized out>, user_data=<value optimized out>) at 
gmain.c:3585
        timeout_source = 0x6ab580
#13 0x0000003107841e33 in g_main_dispatch (context=0x6990e0) at gmain.c:2149
        dispatch = 0x31078435d0 <g_timeout_dispatch>
        was_in_call = 0
        user_data = 0x69b6f0
        callback = 0x40cfde <message_dispatch>
        cb_funcs = 0x3107b05b50
        cb_data = 0x6aba00
        current_source_link = {data = 0x6ab580, next = 0x0}
        need_destroy = <value optimized out>
        source = 0x6ab580
        current = 0x6abb50
        i = <value optimized out>
#14 g_main_context_dispatch (context=0x6990e0) at gmain.c:2702
No locals.
#15 0x0000003107842610 in g_main_context_iterate (context=0x6990e0, block=1, 
dispatch=1, 
    self=<value optimized out>) at gmain.c:2780
        max_priority = 0
        timeout = 0
        some_ready = 1
        nfds = 10
        allocated_nfds = <value optimized out>
        fds = <value optimized out>
#16 0x0000003107842c82 in g_main_loop_run (loop=0x69a1a0) at gmain.c:2988
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#17 0x000000000042ee5c in main (argc=1, argv=0x7fffffffe678) at src/main.c:304
        context = 0x699010
        error = 0x0
        conn = 0x69b6f0
        err = {name = 0x0, message = 0x0, dummy1 = 1, dummy2 = 0, dummy3 = 0, 
dummy4 = 0, 
          dummy5 = 0, padding1 = 0x40b533}
        sa = {__sigaction_handler = {sa_handler = 0x42e956 <sig_term>, 
sa_sigaction = 
    0x42e956 <sig_term>}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags 
= 0, 
          sa_restorer = 0}
        old_umask = 18
        config = 0x0

__connman_notifier_connect() is called from
 __connman_service_indicate_state() because state is
 CONNMAN_SERVICE_STATE_READY which comes from the IPv6
 configuration. So I guess this is just another reason for fixing the
 service state machine.

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

Reply via email to