[PATCH] device: Do not set regdom when device is not powered

2012-07-10 Thread Tomasz Bursztyka
Fixes crash bug: connmand[6761]: plugins/ofono.c:get_properties_reply() /huawei_0 path /huawei_0 org.ofono.NetworkRegistration connmand[6761]: plugins/ofono.c:netreg_properties_reply() /huawei_0 connmand[6761]: plugins/ofono.c:netreg_update_regdom() /huawei_0 MobileContryCode 460 connmand[6761]:

[PATCH] set_regdom crash bug fix

2012-07-10 Thread Tomasz Bursztyka
Hi, After Zheng finding a crash on wifi_set_regdom, here is a quick fix. @Zheng: can you test this? Unfortunately I don't have a 3g dongle here. Thanks, Tomasz Bursztyka (1): device: Do not set regdom when device is not powered src/device.c |3 +++ 1 files changed, 3 insertions(+), 0 de

Re: [PATCH 1/2] connman_crash_after_2/3G_modem_online

2012-07-10 Thread Tomasz Bursztyka
Good catch! But nack on the patch, actually testing powered state on inside connman_device_set_regdom is sufficient. Tomasz When 2/3G modem is online, MobileContryCode will be updated to all devices including wifi. If wifi isn't enabled, the interface->path of wifi isn't available. It result

Re: [PATCH 2/2] connman_crash_after_2/3G_modem_online

2012-07-10 Thread Tomasz Bursztyka
NACK. If wifi is not powered, let's not even try to set regdom, so we should check it in device.c --- plugins/wifi.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index c0f7ddc..7d1aba9 100644 --- a/plugins/wifi.c +++ b/plugi

[PATCH 2/2] connman_crash_after_2/3G_modem_online

2012-07-10 Thread Wu Zheng
--- plugins/wifi.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index c0f7ddc..7d1aba9 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -990,9 +990,12 @@ static int wifi_set_regdom(struct connman_device *device, const char *al

[PATCH 1/2] connman_crash_after_2/3G_modem_online

2012-07-10 Thread Wu Zheng
When 2/3G modem is online, MobileContryCode will be updated to all devices including wifi. If wifi isn't enabled, the interface->path of wifi isn't available. It result in the crash after 2/3G modem is online. [PATCH 1]: Adding the interface to make sure if the device is enabled or not in device

[PATCH v3 5/5] wifi: Debug print fixed

2012-07-10 Thread Jukka Rissanen
Convert a warn message to debug one because it is printed too often to be usefull as a warning message. --- plugins/wifi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index cf7cd95..a6da298 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c

[PATCH v3 4/5] wifi: Scan all hidden and provisioned AP

2012-07-10 Thread Jukka Rissanen
--- plugins/wifi.c | 72 ++-- 1 file changed, 59 insertions(+), 13 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index c0f7ddc..cf7cd95 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -51,6 +51,7 @@ #include #include #incl

[PATCH v3 3/5] config: Get configurations that are provisioned

2012-07-10 Thread Jukka Rissanen
We need the list of provisioned services so that all the hidden ones can be scanned. --- Makefile.am |2 +- include/provision.h | 52 + src/config.c| 81 +++ 3 files changed, 134 insertions(+),

[PATCH v3 2/5] config: Read hidden AP information from config file

2012-07-10 Thread Jukka Rissanen
--- src/config.c |9 + 1 file changed, 9 insertions(+) diff --git a/src/config.c b/src/config.c index 5363dc3..de43933 100644 --- a/src/config.c +++ b/src/config.c @@ -51,6 +51,7 @@ struct connman_config_service { GSList *service_identifiers; char *config_ident; /* fil

[PATCH v3 0/5] Enable hidden AP provisioning

2012-07-10 Thread Jukka Rissanen
Hi, this v3 contains following fixes: The doc patch is now first in the set. I reworked the config file reading so that it can be applied before the other patches in #2. I changed the name of the struct introduced in provision.h. The hash traversing is done a bit differently, we allocate more e

[PATCH v3 1/5] doc: Hidden AP provisioning information added

2012-07-10 Thread Jukka Rissanen
--- doc/config-format.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/config-format.txt b/doc/config-format.txt index 4f76832..d8146be 100644 --- a/doc/config-format.txt +++ b/doc/config-format.txt @@ -53,6 +53,8 @@ Allowed fields: Prefix the value with "EAP-" to indicate the u

Re: [PATCH v2 1/4] config: Get configurations that are provisioned

2012-07-10 Thread Marcel Holtmann
Hi Jukka, > >> +struct connman_config_item **connman_config_get_configs(void) > >> +{ > >> + GHashTableIter iter_file, iter_config; > >> + gpointer value, key; > >> + struct connman_config_item **configs = NULL; > >> + int i, count = 0; > >> + > >> + g_hash_table_iter_init(&iter_file, config_

Re: [PATCH v2 1/4] config: Get configurations that are provisioned

2012-07-10 Thread Jukka Rissanen
Hi Marcel, On 07/10/2012 03:31 PM, Marcel Holtmann wrote: Hi Jukka, We need the list of provisioned services so that all the hidden ones can be scanned. --- Makefile.am |2 +- include/provision.h | 51 ++ src/config.c| 68

[PATCH 4/4] TODO: Remove task about wpspin as PreviousPassphrase type

2012-07-10 Thread Tomasz Bursztyka
--- TODO |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index d1c5864..124d42e 100644 --- a/TODO +++ b/TODO @@ -82,13 +82,6 @@ WiFi Complexity: C2 -- Previous WPS pin code sending - - Priority: Medium - Complexity: C2 - - Provide previous WPS

[PATCH 3/4] doc: Add necessary documentation about wpspin as a PreviousPassphrase type

2012-07-10 Thread Tomasz Bursztyka
--- doc/agent-api.txt | 21 - 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/doc/agent-api.txt b/doc/agent-api.txt index 91371af..a98343f 100644 --- a/doc/agent-api.txt +++ b/doc/agent-api.txt @@ -94,7 +94,9 @@ Fieldsstring Name

[PATCH 2/4] agent: Handle wpspin type as a PreviousPassphrase

2012-07-10 Thread Tomasz Bursztyka
--- src/agent.c | 45 +++-- 1 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/agent.c b/src/agent.c index 5ce7ca9..b597a4f 100644 --- a/src/agent.c +++ b/src/agent.c @@ -360,24 +360,33 @@ static void previous_passphrase_handler(DBusMessa

[PATCH 1/4] agent: Rewrite how PreviousPassphrase field is handled

2012-07-10 Thread Tomasz Bursztyka
This is a necessary rewrite to make it clearer and simpler, before implementing wpspin type support. --- src/agent.c | 50 +++--- 1 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/agent.c b/src/agent.c index 7aaf304..5ce7ca9 100644 -

[PATCH 0/4] Agent API - wpspin support in PreviousPassphrase field

2012-07-10 Thread Tomasz Bursztyka
Hi, A quick patchset to finalize PreviousPassphrase support into agent API so it also handle wpspin now. Please review, Tomasz Bursztyka (4): agent: Rewrite how PreviousPassphrase field is handled agent: Handle wpspin type as a PreviousPassphrase doc: Add necessary documentation about wps

Re: [PATCH v2 2/4] config: Read hidden AP information from config file

2012-07-10 Thread Marcel Holtmann
Hi Jukka, > src/config.c |8 > 1 file changed, 8 insertions(+) > > diff --git a/src/config.c b/src/config.c > index 3b66a73..5a2bd11 100644 > --- a/src/config.c > +++ b/src/config.c > @@ -91,6 +91,7 @@ static connman_bool_t cleanup = FALSE; > #define SERVICE_KEY_IDENTITY

Re: [PATCH v2 3/4] wifi: Scan all hidden and provisioned AP

2012-07-10 Thread Marcel Holtmann
Hi Jukka, > --- > plugins/wifi.c | 78 > ++-- > 1 file changed, 65 insertions(+), 13 deletions(-) > > diff --git a/plugins/wifi.c b/plugins/wifi.c > index c0f7ddc..c807ab9 100644 > --- a/plugins/wifi.c > +++ b/plugins/wifi.c > @@ -51,6 +51,7

Re: [PATCH v2 1/4] config: Get configurations that are provisioned

2012-07-10 Thread Marcel Holtmann
Hi Jukka, > We need the list of provisioned services so that > all the hidden ones can be scanned. > --- > Makefile.am |2 +- > include/provision.h | 51 ++ > src/config.c| 68 > +++ > 3 f