[PATCH] service: Update notifier state when relevant while getting ready
When getting 1 service to online, and disonnecting it: Manager state stays at 'ready'. This is due to service updating the notifier about its state 'ready' 2 times. Once when connecting: idle -> ready, and once when disconnecting: online -> ready. --- src/service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index 5845453..07d89ba 100644 --- a/src/service.c +++ b/src/service.c @@ -5074,7 +5074,8 @@ static int service_indicate_state(struct connman_service *service) dns_changed(service); domain_changed(service); - __connman_notifier_connect(service->type); + if (old_state != CONNMAN_SERVICE_STATE_ONLINE) + __connman_notifier_connect(service->type); if (service->type == CONNMAN_SERVICE_TYPE_WIFI && connman_network_get_bool(service->network, -- 1.8.1 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH] agent: Keep track of the driver to unref user context relevantly
Fixes BMC#25884 --- src/agent.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/agent.c b/src/agent.c index 3be4b61..5c3bd28 100644 --- a/src/agent.c +++ b/src/agent.c @@ -187,9 +187,10 @@ int connman_agent_queue_message(void *user_context, driver = get_driver(); DBG("driver %p", driver); - if (driver != NULL && driver->context_ref != NULL) + if (driver != NULL && driver->context_ref != NULL) { queue_data->user_context = driver->context_ref(user_context); - else + queue_data->driver = driver; + } else queue_data->user_context = user_context; queue_data->msg = dbus_message_ref(msg); -- 1.8.1 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH] ipconfig: Do not disable IPv6 in lower up state
Disabling IPv6 in lower up causes problems in IPv6 connectivity. The interface IPv6 status can stay in disabled state because of races. So this patch reverts the commit 4ce90440a70abce7de53 and lets service IPv6 state go to READY when we get an auto configured address for the interface. Fixes BMC#25929 --- Hi, Wagi, can you try if this causes problems in your setup? The patch lets service IPv6 state go into READY when we have auto IPv6 address setup to the interface. IMHO, this should be the correct thing to do but this needs more testing. Cheers, Jukka src/ipconfig.c | 12 1 file changed, 12 deletions(-) diff --git a/src/ipconfig.c b/src/ipconfig.c index 7fba53b..b400894 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -391,18 +391,6 @@ static void __connman_ipconfig_lower_up(struct connman_ipdevice *ipdevice) { DBG("ipconfig ipv4 %p ipv6 %p", ipdevice->config_ipv4, ipdevice->config_ipv6); - - if (ipdevice->config_ipv6 != NULL && - ipdevice->config_ipv6->enabled == TRUE) - return; - - if (ipdevice->ifname == NULL) - return; - - if (__connman_device_isfiltered(ipdevice->ifname) == FALSE) { - ipdevice->ipv6_enabled = get_ipv6_state(ipdevice->ifname); - set_ipv6_state(ipdevice->ifname, FALSE); - } } static void __connman_ipconfig_lower_down(struct connman_ipdevice *ipdevice) -- 1.7.11.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH] network: Do not report any error when removing a connecting network
Hi, On Tue, 2013-01-15 at 14:57 +0200, Tomasz Bursztyka wrote: > Sorry for the size of the patch, it's actually nothing, really. > 99.9% is just moving many static functions up into the file and that's > it. > > The 0.1%, which is the actual fix, is in network_remove(): > - connman_network_set_connected(network, FALSE); > + if (network->connected == TRUE) > + set_disconnected(network); Please make one patch of the 99.9% including a commit message stating it's moving static functions around. If possible, try another diff algorithm that would produce bigger blobs as it is quite unreadable now. Then make another patch of the 0.1% that fixes the problem. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH] service: Trigger autoconnect when AutoConnect flag is enabled
--- src/service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/service.c b/src/service.c index 5845453..a121b86 100644 --- a/src/service.c +++ b/src/service.c @@ -3045,6 +3045,9 @@ static DBusMessage *set_property(DBusConnection *conn, autoconnect_changed(service); + if (autoconnect == TRUE) + __connman_service_auto_connect(); + service_save(service); } else if (g_str_equal(name, "Nameservers.Configuration") == TRUE) { DBusMessageIter entry; -- 1.7.11.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Pre-configuring an ethernet interface
Hi, On Fri, 2013-01-11 at 14:36 +0100, Bach, Pascal wrote: > 1. Provide a default configuration .config file that sets the Ethernet > defaults to something static instead of DHCPv4. This would be good to > do some default factory configuration. This one is doable. > 2. Allow the user to configure the disconnected device the same way as > if the device was connected. This means the user can change the > settings of an unplugged device to a static configuration or to DHCP > as he likes. As soon as the device gets connected this settings are > used. This one requires quite a lot more; ConnMan would need a list of saved services and D-Bus object paths where these saved services could be edited. In most cases this is could be handled by the .config file above. If the .config file is changed, the changes are noticed by ConnMan... Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH] service: Update notifier state when relevant while getting ready
On Tue, 2013-01-15 at 10:20 +0200, Tomasz Bursztyka wrote: > When getting 1 service to online, and disonnecting it: Manager state > stays at 'ready'. This is due to service updating the notifier about > its state 'ready' 2 times. Once when connecting: idle -> ready, and > once when disconnecting: online -> ready. Applied, thanks! Was there a BMC bug number for this one also? Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH] agent: Keep track of the driver to unref user context relevantly
On Tue, 2013-01-15 at 14:57 +0200, Tomasz Bursztyka wrote: > Fixes BMC#25884 Applied, thanks! Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH] ipconfig: Do not disable IPv6 in lower up state
Hi Jukka, On 15.01.2013 15:11, Jukka Rissanen wrote: Disabling IPv6 in lower up causes problems in IPv6 connectivity. The interface IPv6 status can stay in disabled state because of races. So this patch reverts the commit 4ce90440a70abce7de53 and lets service IPv6 state go to READY when we get an auto configured address for the interface. Fixes BMC#25929 --- Hi, Wagi, can you try if this causes problems in your setup? I can't remember what the exact setup and problem was. But I played a bit around with AutoConnect=false/true Connect()/Disconnect() and plug/unplug the ethernet cableo on a IPv4/IPv6 network and everything seems to work as expected. I did not test it on a IPv6 only network (don't have that setup here). The patch lets service IPv6 state go into READY when we have auto IPv6 address setup to the interface. IMHO, this should be the correct thing to do but this needs more testing. Yeah, sounds reasonable. Let's see what will happen with that patch applied :) Thanks for digging into this problem, daniel ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH] service: Trigger autoconnect when AutoConnect flag is enabled
Hi Jukka, On 15.01.2013 15:47, Jukka Rissanen wrote: --- src/service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/service.c b/src/service.c index 5845453..a121b86 100644 --- a/src/service.c +++ b/src/service.c @@ -3045,6 +3045,9 @@ static DBusMessage *set_property(DBusConnection *conn, autoconnect_changed(service); + if (autoconnect == TRUE) + __connman_service_auto_connect(); + service_save(service); } else if (g_str_equal(name, "Nameservers.Configuration") == TRUE) { DBusMessageIter entry; Seems to help. Not sure if there is still a bug hidden. Following steps lead to a non-autoconnect behavior. - connect to ethernet - wait until ethernet online - connect to wifi - wait until wifi ready - ethernet AutoConnect = false - disconnect ethernet - disconnect wifi - ethernet AutoConnect = true replugging the ethernet 'fixed' it. cheers, daniel ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH] ipconfig: Do not disable IPv6 in lower up state
Hi Daniel, On 15 January 2013 17:21, Daniel Wagner wrote: > I can't remember what the exact setup and problem was. But I played a bit > around with AutoConnect=false/true Connect()/Disconnect() and plug/unplug > the ethernet cableo on a IPv4/IPv6 network and everything seems to work as > expected. I did not test it on a IPv6 only network (don't have that setup > here). > It is possible to simulate IPv6 only network by setting service IPv4 method to OFF and IPv6 method to AUTO (which is the default). In this case IPv4 address is not set to the interface and this is basically the same as if the network does not have IPv4 connectivity. Cheers, Jukka ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH] service: Update notifier state when relevant while getting ready
Hi Patrik, Applied, thanks! Was there a BMC bug number for this one also? Afaik, no. Tomasz ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman