Re: [PATCH] Rename org.moblin.connman to net.connman
On 12/10/2010 01:58 PM, Jussi Kukkonen wrote: On 12/10/2010 11:46 AM, Daniel Wagner wrote: On Fri, Nov 26, 2010 at 03:39:12PM +0200, Jussi Kukkonen wrote: On 11/26/2010 02:38 PM, Daniel Wagner wrote: From: Daniel Wagner daniel.wag...@bmw-carit.de Adapt to ConnMan release v0.64 changes. --- Any ideas to whom I can send this? Thanks Daniel, I'll take this (might not happen until monday though). ping :) Hey Daniel, I have pushed a fix to gitorious last week, but I just double checked and noticed there was another fix for the 3g dialog that was just local -- should be there now. Hey Daniel, FYI, Samuel noted that I had still managed to miss a some org.moblin references in the callouts/ directory. I'm fixing these right away. After that: happy holidays everyone, Jussi ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH 3/3] Wait for configuration to be provided at startup, with timeout
Hi David, On Wed, Dec 22, 2010 at 03:18:25AM +, David Woodhouse wrote: On Wed, 2010-12-22 at 00:20 +0100, Samuel Ortiz wrote: The patch looks mostly fine, but I think we should also wake sleeping threads from pacrunner_proxy_set_direct(). Oh crap, yes. I thought along those lines for pacrunner_proxy_set_manual(), which is actually OK because we do it in pacrunner_proxy_enable(). I didn't then check that pacrunner_proxy_set_direct() was the same. Sorry about that. No problem. I applied and pushed your 4 patches, thanks for fixing that race. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH memleak 02/10] memoryleak: SSID was not freed
--- plugins/supplicant.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 5f2d204..df181d8 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -635,8 +635,12 @@ static void add_interface_reply(DBusPendingCall *call, void *user_data) ssid[k++] = hex; } - if (add_hidden_network(task, ssid, hex_ssid_len / 2) 0) + if (add_hidden_network(task, ssid, hex_ssid_len / 2) 0) { + g_free(ssid); break; + } + + g_free(ssid); } g_strfreev(hex_ssids); -- 1.7.0.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH memleak 01/10] memoryleak: network interface string was not freed
--- plugins/portal.c | 18 -- 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/portal.c b/plugins/portal.c index d4456f5..cad2998 100644 --- a/plugins/portal.c +++ b/plugins/portal.c @@ -105,7 +105,7 @@ static int location_detect(struct connman_location *location) { struct server_data *data; enum connman_service_type service_type; - const char *interface; + char *interface; int err; DBG(location %p, location); @@ -134,15 +134,18 @@ static int location_detect(struct connman_location *location) DBG(interface %s, interface); data = g_try_new0(struct server_data, 1); - if (data == NULL) - return -ENOMEM; + if (data == NULL) { + err = -ENOMEM; + goto done; + } connman_location_set_data(location, data); data-web = g_web_new(0); if (data-web == NULL) { g_free(data); - return -ENOMEM; + err = -ENOMEM; + goto done; } if (getenv(CONNMAN_WEB_DEBUG)) @@ -155,11 +158,14 @@ static int location_detect(struct connman_location *location) err = connman_proxy_lookup(interface, STATUS_URL, proxy_callback, location); if (err 0) - return err; + goto done; connman_location_ref(location); + err = 0; - return 0; +done: + g_free(interface); + return err; } static int location_finish(struct connman_location *location) -- 1.7.0.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH memleak 09/10] Possible memory leak when creating ipconfig
--- src/service.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/service.c b/src/service.c index c6d3d36..2e5974f 100644 --- a/src/service.c +++ b/src/service.c @@ -4324,7 +4324,8 @@ __connman_service_create_from_provider(struct connman_provider *provider) service-strength = 0; - service-ipconfig_ipv4 = connman_ipconfig_create(index, + if (service-ipconfig_ipv4 == NULL) + service-ipconfig_ipv4 = connman_ipconfig_create(index, CONNMAN_IPCONFIG_TYPE_IPV4); if (service-ipconfig_ipv4 == NULL) return service; @@ -4334,7 +4335,8 @@ __connman_service_create_from_provider(struct connman_provider *provider) connman_ipconfig_set_data(service-ipconfig_ipv4, service); connman_ipconfig_set_ops(service-ipconfig_ipv4, service_ops); - service-ipconfig_ipv6 = connman_ipconfig_create(index, + if (service-ipconfig_ipv6 == NULL) + service-ipconfig_ipv6 = connman_ipconfig_create(index, CONNMAN_IPCONFIG_TYPE_IPV6); if (service-ipconfig_ipv6 == NULL) return service; -- 1.7.0.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH memleak 06/10] memoryleak: method was not freed
--- src/ipconfig.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/ipconfig.c b/src/ipconfig.c index 3e6f738..db350d3 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -1742,7 +1742,7 @@ void __connman_ipconfig_append_ethernet(struct connman_ipconfig *ipconfig, int __connman_ipconfig_load(struct connman_ipconfig *ipconfig, GKeyFile *keyfile, const char *identifier, const char *prefix) { - const char *method; + char *method; char *key; DBG(ipconfig %p identifier %s, ipconfig, identifier); @@ -1760,6 +1760,7 @@ int __connman_ipconfig_load(struct connman_ipconfig *ipconfig, if (ipconfig-method == CONNMAN_IPCONFIG_METHOD_UNKNOWN) ipconfig-method = CONNMAN_IPCONFIG_METHOD_OFF; + g_free(method); g_free(key); key = g_strdup_printf(%snetmask_prefixlen, prefix); -- 1.7.0.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH memleak v2 1/4] memoryleak: remove the element for real
--- src/connection.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/connection.c b/src/connection.c index bac700f..1a386ae 100644 --- a/src/connection.c +++ b/src/connection.c @@ -405,6 +405,8 @@ static void connection_remove(struct connman_element *element) if (data != NULL) set_default_gateway(data); } + + connman_element_unref(element); } static struct connman_driver connection_driver = { -- 1.7.0.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH memleak v2 2/4] memoryleak: dhcp_client is already referenced when created
--- plugins/dhcp.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/plugins/dhcp.c b/plugins/dhcp.c index e3d1957..aaac96d 100644 --- a/plugins/dhcp.c +++ b/plugins/dhcp.c @@ -154,8 +154,6 @@ static int dhcp_request(struct connman_dhcp *dhcp) connman_dhcp_set_data(dhcp, dhcp_client); - g_dhcp_client_ref(dhcp_client); - return g_dhcp_client_start(dhcp_client); } -- 1.7.0.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH memleak v2 0/4] More memory leaks
Hi again, more memory leaks, these were a bit trickier to find. Regards, Jukka Jukka Rissanen (4): memoryleak: remove the element for real memoryleak: dhcp_client is already referenced when created memoryleak: remove the element when not needed memoryleak: remove element when not needed any more plugins/dhcp.c |2 -- src/connection.c |2 ++ src/dhcp.c |1 + src/ipv4.c |2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
802.1X/PEAP Port-Based Authentication
Hi! I am unable to connect to a 802.1X/PEAP wifi network. I have the following configuration file for that network. This file provides a EAP-PEAP service. [global] Name = TID Description = TID Network Configuration [service_peap] Type = wifi SSID=496e7472616e657454656c65666f6e69636157694669 EAP = peap Phase2 = MSCHAPV2 CACertFile = /etc/certs/cacert.pem Identity = HI\jaoo Password = *** If I launch wpa_supplicant as 'wpa_supplicant -u -t -d' and 'connmand -W nl80211,wext -n' and read the log later it seems wpa_supplicant is unable to read the server certificate. 1293021750.585645: OpenSSL: tls_connection_ca_cert - Failed to load root certificates error:02001002:system library:fopen:No such file or directory 1293021750.585671: OpenSSL: pending error: error:2006D080:BIO routines:BIO_new_file:no such file 1293021750.585690: OpenSSL: pending error: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib 1293021750.585727: OpenSSL: tls_load_ca_der - Failed load CA in DER format error:02001002:system library:fopen:No such file or directory 1293021750.585750: OpenSSL: pending error: error:20074002:BIO routines:FILE_CTRL:system lib 1293021750.585767: OpenSSL: pending error: error:0B06F002:x509 certificate routines:X509_load_cert_file:system lib Please find attached full wpa_supplicant and connmand logs. Could anybody help me? Respectfully, jaoo. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH] 3g: Fix CONNMAN_SERVICE defines
For those building meego-panel-networks, you'll need this patch for the 3G wizzard to work. Jussi should push it soon. --- callouts/3g/ggg-service.c |2 +- callouts/3g/main.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/callouts/3g/ggg-service.c b/callouts/3g/ggg-service.c index 99d4a3b..527df29 100644 --- a/callouts/3g/ggg-service.c +++ b/callouts/3g/ggg-service.c @@ -26,7 +26,7 @@ #include carrick/connman-service-bindings.h #include ggg-service.h -#define CONNMAN_SERVICE org.moblin.connman +#define CONNMAN_SERVICE net.connman #define CONNMAN_MANAGER_PATH / #define CONNMAN_MANAGER_INTERFACE CONNMAN_SERVICE .Manager #define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE .Service diff --git a/callouts/3g/main.c b/callouts/3g/main.c index 8d3c727..ba1e5d0 100644 --- a/callouts/3g/main.c +++ b/callouts/3g/main.c @@ -36,7 +36,7 @@ #include carrick/connman-manager-bindings.h -#define CONNMAN_SERVICE org.moblin.connman +#define CONNMAN_SERVICE net.connman #define CONNMAN_MANAGER_PATH / #define CONNMAN_MANAGER_INTERFACE CONNMAN_SERVICE .Manager #define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE .Service -- 1.7.2.3 -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH] Avoid autoconnect from scan.
If we are scanning then don't try to run autoconnect while we are adding network from scan, at the end of scan auto connect will be called. --- src/connman.h |2 ++ src/device.c |5 + src/service.c |8 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/connman.h b/src/connman.h index 7c926fe..63eef63 100644 --- a/src/connman.h +++ b/src/connman.h @@ -352,6 +352,8 @@ int __connman_device_disable(struct connman_device *device); int __connman_device_disable_persistent(struct connman_device *device); int __connman_device_disconnect(struct connman_device *device); +connman_bool_t __connman_device_scanning(struct connman_device *device); + connman_bool_t __connman_device_has_driver(struct connman_device *device); void __connman_device_set_reconnect(struct connman_device *device, diff --git a/src/device.c b/src/device.c index 957be7c..65ff88c 100644 --- a/src/device.c +++ b/src/device.c @@ -815,6 +815,11 @@ void __connman_device_cleanup_networks(struct connman_device *device) remove_unavailable_network, NULL); } +connman_bool_t __connman_device_scanning(struct connman_device *device) +{ + return device-scanning; +} + /** * connman_device_set_scanning: * @device: device structure diff --git a/src/service.c b/src/service.c index 6ca80cd..f06de26 100644 --- a/src/service.c +++ b/src/service.c @@ -4125,6 +4125,7 @@ static void update_from_network(struct connman_service *service, struct connman_service * __connman_service_create_from_network(struct connman_network *network) { struct connman_service *service; + struct connman_device *device; const char *ident, *group; char *name; int index; @@ -4185,8 +4186,11 @@ struct connman_service * __connman_service_create_from_network(struct connman_ne service_register(service); - if (service-favorite == TRUE) - __connman_service_auto_connect(); + if (service-favorite == TRUE) { + device = connman_network_get_device(service-network); + if (device __connman_device_scanning(device) == FALSE) + __connman_service_auto_connect(); + } return service; } -- 1.7.3.3 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH 3/5] Fix auto_connect race interval
Hi Mohamed, On Mon, Dec 20, 2010 at 11:07:34AM -0800, Mohamed Abbas wrote: This patch fix the race condition that caused more than one service to start connecting at the same fime by: * Make sure is_connecting always returning the right status of the network and dont allow the small intevel until get the G_SUPPLICANT_STATE_AUTHENTICATING or G_SUPPLICANT_STATE_ASSOCIATING signal from supplicant. * Fix serving soring so connecting service will make it in the top so auto_connect search will work. * Dont need device-connected in end scan to decide to call auto_connect. This patch used Samuel patch and add to it. case CONNMAN_SERVICE_STATE_UNKNOWN: case CONNMAN_SERVICE_STATE_IDLE: case CONNMAN_SERVICE_STATE_FAILURE: + if (service-network != NULL) + return __connman_network_get_connecting( + service-network); case CONNMAN_SERVICE_STATE_DISCONNECT: The patch by itself looks fine to me. However, I'd like to see it splitted in 2: 1 for the network.c and service.c changes and then another one for not using disconnected anymore. Also, I have one more request: diff --git a/src/network.c b/src/network.c index 57d873a..81f963e 100644 --- a/src/network.c +++ b/src/network.c @@ -896,10 +896,10 @@ int __connman_network_connect(struct connman_network *network) if (network-device == NULL) return -ENODEV; - __connman_device_disconnect(network-device); - network-connecting = TRUE; + __connman_device_disconnect(network-device); + Could we please add some comment here to describe the race we're trying to fix by setting connecting before calling __connman_device_disconnect(). Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
RE: [PATCH] Fix WiFi AP list issue after killed/restart
Could someone kindly review this patch? Thanks, Leena ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman