[PATCH 2/3] config: Refactor connecting after service provisioning

2014-09-09 Thread Patrik Flykt
Refactor the code that implicitely called __connman_service_connect() for ethernet and gadget services and __connman_service_autoconnect() for a non-NFC provisioned wifi service to do this explicitely. Ethernet and gadget services are to be connected immediately when provisioned as the services on

[PATCH 1/3] config: Refactor checks for configuration file type

2014-09-09 Thread Patrik Flykt
In case of WiFi networks continue with SSID and security method checks after verifying the configuration file type. For ethernet and gadget the configuration file type checking can be combined. This change also delegates one more instance of explicit service type string checks to service.c where th

Re: Help with tethering using RTL8188CUS

2014-09-09 Thread Patrik Flykt
Hi, On Tue, 2014-09-09 at 11:33 +0200, Frederik Lotter wrote: > Hi guys, > > I posted for some assistance on the IRC channel. I did not see any reply. > Could anyone kindly have a look at my issue have give me a pointers if > possible? Sorry, must have been off the channel when you post

Re: [PATCH] service: Fix config file passphrase setting

2014-09-09 Thread Patrik Flykt
Hi, On Tue, 2014-09-09 at 10:01 +0300, Jukka Rissanen wrote: > Hi Patrik, > > On ma, 2014-09-08 at 13:38 +0300, Patrik Flykt wrote: > > Create a local passphrase setting function as config files would > > otherwise use the internal passphrase setting fun

[PATCH] service: Fix config file passphrase setting

2014-09-08 Thread Patrik Flykt
Create a local passphrase setting function as config files would otherwise use the internal passphrase setting function which disallows modifications to immutable .config files. --- src/service.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/service.c

Re: [PATCH pacrunner] client: Detach threads since they are never joined

2014-09-05 Thread Patrik Flykt
On Wed, 2014-09-03 at 11:31 +0300, Slava Monich wrote: > By default, a new thread is created in a joinable state. Applied with the following commit message: Unless the threads are created as detached (or joined, which is not the case here), not all resources will be released when the thread exits

Re: [PATCH] gsupplicant: Defer group request to peer property

2014-09-05 Thread Patrik Flykt
On Fri, 2014-09-05 at 07:45 -0400, Eduardo Abinader wrote: > There exists scenarios, when connman receives a group > request and the requesting peer hasn't been discovered > yet, wpa_supplicant issues a peer found just before > signaling group request. However, the just signaled peer > found have i

Re: [PATCH 0/2] Peer services bug fix

2014-09-05 Thread Patrik Flykt
On Fri, 2014-09-05 at 14:41 +0300, Tomasz Bursztyka wrote: > Found 2 obvious bugs in my previous patch-set. One on manger's API parameter > parsing and the other one about the logic on listening to p2p frames while > 2+ services are registered. Applied, thanks! Patrik ___

Re: agent, route questions with 1.25

2014-09-05 Thread Patrik Flykt
Hi, On Thu, 2014-09-04 at 17:02 -0400, Mike Purvis wrote: > - When I connect to my wifi, it no longer creates a directory for it under > /var/lib/connman. Did this behaviour change? I'm assuming this is related > to the not-reconnecting behaviour. This means it did not get connected. >

Re: agent, route questions with 1.25

2014-09-05 Thread Patrik Flykt
Hi, On Thu, 2014-09-04 at 15:07 -0400, Mike Purvis wrote: > First, what's up with the change to make the agent only work in interactive > mode? Having to do the whole agent/scan/connect dance inside the connmanctl > prompt, and away from my bash history, is a pretty big pain. When run i

Re: [PATCH v2 0/4] Code cleanups

2014-09-05 Thread Patrik Flykt
On Wed, 2014-09-03 at 10:28 +0300, Patrik Flykt wrote: > Hi, > > These four patches are what now remains of the 'Code cleanups' patch set. > The new patches 1/4 and 2/4 are essentially the same as 5/8 and 6/8 in > the previous patch set, except for a minor refac

Re: [PATCH] gsupplicant: Add property calls to property_calls list

2014-09-04 Thread Patrik Flykt
On 2014-09-03 06:54, Eduardo Abinader wrote: Although the logic for handling property call list was available, the property call list was not being populated. --- Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.

Re: [PATCH] service: Move dbg on service_schedule_removed after sanity check

2014-09-04 Thread Patrik Flykt
On 2014-09-03 06:07, Eduardo Abinader wrote: Avoid an invalid read by moving debug message after sanity check. Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman

Re: [PATCH 00/12] Peer Service (un)registration API

2014-09-04 Thread Patrik Flykt
On 2014-09-03 09:56, Tomasz Bursztyka wrote: Hi, Here is the patch-set which adds the support for the Peer Service (un)registration part in Manager API. It required some changes on Peer API as well. It is now possible to advertize about UPNP or Bonjour services. The device will become discove

[PATCH v2 3/4] service: Remove __connman_service_add_passphrase()

2014-09-03 Thread Patrik Flykt
Merge the logic in __connman_service_add_passphrase into the passphrase verification function as there is no use of an additional function indirection. --- src/connman.h | 2 -- src/network.c | 2 +- src/service.c | 40 +++- 3 files changed, 12 insertions(+),

[PATCH v2 0/4] Code cleanups

2014-09-03 Thread Patrik Flykt
4 contains the function argument changes. Patches 3/4 and 4/4 are the same as the previous 8/8 and 7/8, respectively. Cheers, Patrik Patrik Flykt (4): service: Make a specifig function for clearing a passphrase on error service: Clean up __connman_service_set_passphrase() servi

[PATCH v2 2/4] service: Clean up __connman_service_set_passphrase()

2014-09-03 Thread Patrik Flykt
Increase readability of the code by first checking for the error condition so that one level of indentation can be removed. The return value will always be <= 0. --- src/service.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/service.c b/src/servi

[PATCH v2 1/4] service: Make a specifig function for clearing a passphrase on error

2014-09-03 Thread Patrik Flykt
On error clear the passphrase without saving it permanently. This makes it safe to reuse the passphrase checking function elsewhere as there will not be any unintended side effects when the service is favorite. --- src/service.c | 31 --- 1 file changed, 16 insertions(+

[PATCH v2 4/4] service: Use proper function when setting service Passphrase attribute

2014-09-03 Thread Patrik Flykt
Instead of directly changing the passphrase, use __connman_service_set_passphrase() which does the passphrase sanity checking. --- src/service.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/service.c b/src/service.c index a34e9af..457e542 100644 --- a/src/service.c

Re: [PATCH 0/8] Code cleanups

2014-09-02 Thread Patrik Flykt
On Thu, 2014-08-28 at 15:10 +0300, Patrik Flykt wrote: > Here is a set of cleanup patches. The first four are not supposed to > change any functionality but instead provide a bit better readability > in the code. Patches 02, 04, 03 and 01 applied in this order.

Re: [PATCH 0/2] Clean group interface and mapping

2014-09-02 Thread Patrik Flykt
On Tue, 2014-09-02 at 08:23 -0400, Eduardo Abinader wrote: > When a p2p group is finished, the peers holding the just > removed group interface shall be updated accordingly. The > same must happen to group_mapping, as the p2p group was > finished. ...and applied. Thanks! Patrik ___

Re: [PATCH] service: Change service state before changing manager state

2014-09-02 Thread Patrik Flykt
Hi, On Thu, 2014-08-28 at 15:44 +0800, Chengyi Zhao wrote: > The manager state is a global connection state of the system, > and it is a result of evaluating various notification states. > > In order to ensure the consistency of data, ConnMan should > change the service state before cha

Re: [PATCH] ipconfig: Do not pass a NULL pointer to D-Bus

2014-09-02 Thread Patrik Flykt
On Fri, 2014-08-29 at 10:00 +0300, Hannu Mallat wrote: > connman_inet_ifname() may return a NULL pointer e.g. if the interface > does not exist in the kernel anymore but connman isn't yet aware of > that. Passing a NULL pointer to D-Bus may result in an abort, so check > the return value. Applied,

Re: [PATCH] peer: Add debug msg for peer state

2014-09-02 Thread Patrik Flykt
On Thu, 2014-08-28 at 23:41 -0400, Eduardo Abinader wrote: > In order to ease the debug task of peer state changes, inserted > this old state/new state track. Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.co

Re: question: settings and profiles for connman

2014-09-01 Thread Patrik Flykt
Hi, On Fri, 2014-08-29 at 15:01 +0200, Benjamin Block wrote: > I just wanted to ask, if it is possible to configure connman in a way > that I can switch to specific settings depending on the location I am at > (no problem if I have to trigger this switch) and maybe fall back to > dhcpcd

Re: [PATCH] client: Detach threads since they are never joined

2014-09-01 Thread Patrik Flykt
Hi, On Mon, 2014-09-01 at 15:52 +0300, Slava Monich wrote: > On 01/09/14 13:16, Patrik Flykt wrote: > > On Sat, 2014-08-30 at 15:15 +0300, Slava Monich wrote: > >> This is for pacrunner. > > More motivation in here why this patch is good, please. > >

Re: [PATCH] client: Detach threads since they are never joined

2014-09-01 Thread Patrik Flykt
On Sat, 2014-08-30 at 15:15 +0300, Slava Monich wrote: > This is for pacrunner. More motivation in here why this patch is good, please. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/c

Re: [PATCH 0/6 v2] P2P Incoming connection support

2014-08-28 Thread Patrik Flykt
On Thu, 2014-08-28 at 15:30 +0300, Tomasz Bursztyka wrote: > Tomasz Bursztyka (6): > gsupplicant: Regroup a function for readability > gsupplicant: Add GONegociationRequest signal handler > agent: Fix Peer authorization reply WPS choice handling logic > peer: Add a function forward incoming

Re: [PATCH 0/5] Incoming connection support

2014-08-28 Thread Patrik Flykt
On Thu, 2014-08-28 at 09:18 +0300, Tomasz Bursztyka wrote: > These patches implement the incoming connection request handling, from > gsupplicant's signal to the Agent API and it's support in the client. Ok, I was quite quick and applied patches 1-4 from this set. Please resend only patch 5/5 spli

Re: [PATCH 0/2] Solve issues in pending wifi data

2014-08-28 Thread Patrik Flykt
On Wed, 2014-08-20 at 07:06 -0400, Eduardo Abinader wrote: > The following patchset addresses other midst situation, > when a p2p group is being negotiated and, for some reason, > p2p interface is removed. Added an extra check and > provided a proper cleanup of pending wifi device list, > upon wi

[PATCH 2/8] service: Clean up two consecutive if statements.

2014-08-28 Thread Patrik Flykt
These two ifs can be combined into one. --- src/service.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/service.c b/src/service.c index d65443c..fde3e00 100644 --- a/src/service.c +++ b/src/service.c @@ -4005,10 +4005,8 @@ static DBusMessage *disconnect_service(DBus

[PATCH 1/8] service: Clean up multiple if statements with a case statement

2014-08-28 Thread Patrik Flykt
This makes the code more readable in service_indicate_state(). --- src/service.c | 43 +++ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/src/service.c b/src/service.c index f35f436..d65443c 100644 --- a/src/service.c +++ b/src/service.c @@

[PATCH 5/8] service: Make a specifig function for clearing a passphrase on error

2014-08-28 Thread Patrik Flykt
On error clear the passphrase without saving it permanently. This makes it safe to reuse the passphrase checking function elsewhere as there will not be any unintended side effects when the service is favorite. --- src/service.c | 24 +--- 1 file changed, 13 insertions(+), 11 d

[PATCH 3/8] service: Clean up __connman_service_ipconfig_indicate_state()

2014-08-28 Thread Patrik Flykt
Clean up the function by first doing a proper switch statement and setting up a pointer to the ipconfig and state. Reuse the pointers when setting the new state instead of comparing the method once again. --- src/service.c | 52 ++-- 1 file changed,

[PATCH 8/8] service: Remove __connman_service_add_passphrase()

2014-08-28 Thread Patrik Flykt
Merge the logic in __connman_service_add_passphrase into the passphrase verification function as there is no use of an additional function indirection. --- src/connman.h | 2 -- src/network.c | 2 +- src/service.c | 40 +++- 3 files changed, 12 insertions(+),

[PATCH 0/8] Code cleanups

2014-08-28 Thread Patrik Flykt
they relate to passphrase handling. Please review, Patrik Patrik Flykt (8): service: Clean up multiple if statements with a case statement service: Clean up two consecutive if statements. service: Clean up __connman_service_ipconfig_indicate_state() network: Remove unused function

[PATCH 4/8] network: Remove unused function connman_network_clear_error()

2014-08-28 Thread Patrik Flykt
--- include/network.h | 1 - src/network.c | 16 2 files changed, 17 deletions(-) diff --git a/include/network.h b/include/network.h index fcb6905..d772699 100644 --- a/include/network.h +++ b/include/network.h @@ -96,7 +96,6 @@ int connman_network_set_associating(struct con

[PATCH 6/8] service: Clean up the passphrase setting logic

2014-08-28 Thread Patrik Flykt
Clean up the function not to take a service argument as it is no longer used. Drop the indentation by checking first for error. --- src/service.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/service.c b/src/service.c index 8131093..d8465dc

[PATCH 7/8] service: Use proper function when setting service Passphrase attribute

2014-08-28 Thread Patrik Flykt
Instead of directly changing the passphrase, use __connman_service_set_passphrase() which does the passphrase sanity checking. --- src/service.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/service.c b/src/service.c index d8465dc..78eb13c 100644 --- a/src/service.c

Re: [PATCH] gsupplicant: Check peer_mapping before removing items

2014-08-20 Thread Patrik Flykt
On Sun, 2014-08-17 at 23:23 -0400, Eduardo Abinader wrote: > Added a check in order to avoid glib assert warnings > during remove_interface call, when peer_mapping was > already empty. Patch applied, thanks! Patrik ___ connman mailing list conn

Re: [PATCH] peer: Make sure to disconnect relevandly on idle state transition

2014-08-15 Thread Patrik Flykt
On Fri, 2014-08-15 at 15:08 +0300, Tomasz Bursztyka wrote: > In case of cancelling the connection, idle will be set, but we might be > in the middle of a connection so ensuring it properly cleans via calling > disconnect. Applied, thanks! Patrik __

Re: [PATCH 0/3] Some improvement in p2p find

2014-08-15 Thread Patrik Flykt
On Fri, 2014-08-15 at 07:07 -0400, Eduardo Abinader wrote: > Hi, > > Patchset v2 with Tomasz's recommendation. > > The following patchset tries to improve the peer discovery, > by antecipating p2p find start, if requested, despite a wifi > scan running. Furthermore, detects if there's an ongoing

Re: [PATCH] device: Do not try to bring up an invalid device index

2014-08-15 Thread Patrik Flykt
On Fri, 2014-08-15 at 14:13 +0300, Tomasz Bursztyka wrote: > In certain case, the device structure exists but is not related to any > device index. Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/m

Re: [PATCH 0/3] Three Coverity fixes

2014-08-15 Thread Patrik Flykt
On Fri, 2014-08-15 at 13:29 +0300, Patrik Flykt wrote: > Hi, > > Three fixes for Wagi's Coverity check round. The rand(om) ones need some > more thought, and not checking the return value should be ok unless I > missed something. > > The first patch was sent to

Re: [PATCH 2/3] supplicant: Added a function to detect if p2p is finding

2014-08-15 Thread Patrik Flykt
On Fri, 2014-08-15 at 07:29 -0400, Eduardo Abinader wrote: > Should I resend the patchet? I'll fix in when applying. Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman

[PATCH 3/3] plugins: Netmask length cannot be zero

2014-08-15 Thread Patrik Flykt
--- plugins/vpn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/vpn.c b/plugins/vpn.c index 25711d7..e6e4c8e 100644 --- a/plugins/vpn.c +++ b/plugins/vpn.c @@ -1078,7 +1078,7 @@ static struct vpn_route *parse_user_route(const char *user_route)

[PATCH 1/3] dhcp: Check that network is not NULL before unreferencing

2014-08-15 Thread Patrik Flykt
--- src/dhcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dhcp.c b/src/dhcp.c index 6839d1f..4436164 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -622,7 +622,8 @@ int __connman_dhcp_start(struct connman_ipconfig *ipconfig, err = dhcp_initialize(dhcp);

[PATCH 0/3] Three Coverity fixes

2014-08-15 Thread Patrik Flykt
Hi, Three fixes for Wagi's Coverity check round. The rand(om) ones need some more thought, and not checking the return value should be ok unless I missed something. Cheers, Patrik Patrik Flykt (3): dhcp: Check that network is not NULL before unreferencing config: Ne

[PATCH 2/3] config: Netmask length cannot be zero

2014-08-15 Thread Patrik Flykt
--- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 330ae81..9aa7da5 100644 --- a/src/config.c +++ b/src/config.c @@ -399,7 +399,7 @@ static bool load_service_generic(GKeyFile *keyfile, char *ptr;

[PATCH 0/3] Three Coverity fixes

2014-08-15 Thread Patrik Flykt
heers, Patrik Patrik Flykt (3): dhcp: Check that network is not NULL before unreferencing config: Netmask length cannot be zero plugins: Netmask length cannot be zero plugins/vpn.c | 2 +- src/config.c | 2 +- src/dhcp.c| 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) --

[PATCH] dhcp: Check that network is not NULL before unreferencing

2014-08-15 Thread Patrik Flykt
--- src/dhcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dhcp.c b/src/dhcp.c index 6839d1f..4436164 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -622,7 +622,8 @@ int __connman_dhcp_start(struct connman_ipconfig *ipconfig, err = dhcp_initialize(dhcp);

Re: [PATCH v2] service: Reply to disconnection from association and configuration states

2014-08-15 Thread Patrik Flykt
On Fri, 2014-08-15 at 11:06 +0300, Patrik Flykt wrote: > A D-Bus reply to the client calling Connect() has been properly sent when > entering ready and failure states and a also on a proper disconnect when > calling __connman_service_disconnect(). > > But when a service enters d

[PATCH v2] service: Reply to disconnection from association and configuration states

2014-08-15 Thread Patrik Flykt
A D-Bus reply to the client calling Connect() has been properly sent when entering ready and failure states and a also on a proper disconnect when calling __connman_service_disconnect(). But when a service enters disconnect state from either association or configuration states, sending of the D-Bu

[PATCH] service: Reply to disconnection from association and configuration states

2014-08-15 Thread Patrik Flykt
A D-Bus reply to the client calling Connect() has been properly sent when entering ready and failure states and a also on a proper disconnect when calling __connman_service_disconnect(). But when a service enters disconnect state from either association or configuration states, sending of the D-Bu

[PATCH 3/3] doc: Document the config file 'Security' option

2014-08-13 Thread Patrik Flykt
--- doc/config-format.txt | 4 1 file changed, 4 insertions(+) diff --git a/doc/config-format.txt b/doc/config-format.txt index d825070..f2927e2 100644 --- a/doc/config-format.txt +++ b/doc/config-format.txt @@ -87,6 +87,10 @@ The following options are valid if Type is "wifi" Prefix the v

[PATCH 2/3] config: Add option specify WiFi security in a .config file

2014-08-13 Thread Patrik Flykt
Add a 'Security' option to specify the WiFi security type. By default the security mode is set to WPA PSK if a passphrase is present. Configuring EAP takes precedence over this option. Fixes CM-661 --- src/config.c | 41 + 1 file changed, 41 insertions(+)

[PATCH 1/3] service: Add helper function for getting security type

2014-08-13 Thread Patrik Flykt
Input a string, output a security type, if any was detected. --- src/connman.h | 1 + src/service.c | 17 + 2 files changed, 18 insertions(+) diff --git a/src/connman.h b/src/connman.h index db6461f..9fecb28 100644 --- a/src/connman.h +++ b/src/connman.h @@ -736,6 +736,7 @@ void

[PATCH 0/3] Provide WiFi security type in config files

2014-08-13 Thread Patrik Flykt
d. Cheers, Patrik Patrik Flykt (3): service: Add helper function for getting security type config: Add option specify WiFi security in a .config file doc: Document the config file 'Security' option doc/config-format.txt | 4 src/co

Re: [PATCH] Properly parse uncompressed DNS names

2014-08-12 Thread Patrik Flykt
On Wed, 2014-08-06 at 21:55 +0200, Mathias Hasselmann wrote: > Hi, > > When parsing uncompressed DNS names the end pointer only must be updated > when encountering a compressed label, or after parsing all uncompressed > labels. Otherwise parse_rr() will interpret the second uncompressed > label

Re: [PATCH] service: Properly clear a service in failed state after not retrying

2014-08-12 Thread Patrik Flykt
On Mon, 2014-08-11 at 12:58 +0300, Patrik Flykt wrote: > Use __connman_service_clear_error() to return the service to idle state > as also ipconfigs for IPv4 and IPv6 need to be set to idle state. Applied, thanks for testing.

[PATCH] service: Properly clear a service in failed state after not retrying

2014-08-11 Thread Patrik Flykt
Use __connman_service_clear_error() to return the service to idle state as also ipconfigs for IPv4 and IPv6 need to be set to idle state. Fixes CM-662 --- This should fix the other half of the reported CM-662 Patrik src/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [PATCH] gsupplicant: Avoid invalid read during system_killed

2014-08-11 Thread Patrik Flykt
On Sun, 2014-08-10 at 22:49 -0400, Eduardo Abinader wrote: > When terminating a connman instance with ready p2p > connection, interface_table was trying to free a > removed interface, so just inverting the deinit order, > solves the issue. Applied, thanks! Patrik

Re: [PATCH] wifi: Add sanity check in the middle of chicken and egg issue

2014-08-11 Thread Patrik Flykt
On Sun, 2014-08-10 at 22:45 -0400, Eduardo Abinader wrote: > Got a segmentation fault in the middle of a group > configuration, where the pending p2p-wlan was no > more available. This check actually comes ahead of > another one in interface_added. Applied, thanks! Patrik ___

Re: [PATCH] main: Change cleanup order for proper peer deinit

2014-08-11 Thread Patrik Flykt
On Sun, 2014-08-10 at 22:47 -0400, Eduardo Abinader wrote: > Cleanup is causing an invalid read during deinitialization > of an already freed ippool. Just moving the cleanup order, > ensures proper deinitialization of ippool references. Applied, thanks! Patrik ___

[PATCH] service: Clean up __connman_service_ipconfig_indicate_state()

2014-08-10 Thread Patrik Flykt
Clean up the function by first doing a proper switch statement and setting up a pointer to the ipconfig and state. Reuse the pointers when setting the new state instead of comparing the method once again. --- src/service.c | 53 +++-- 1 file changed,

Re: [PATCH 0/2] Fix retrying of a service when given wrong passphrase

2014-08-10 Thread Patrik Flykt
On Fri, 2014-08-08 at 14:50 +0300, Patrik Flykt wrote: > Hi, > > Here is a fix for CM-622, prepended by a simple code cleanup patch. Applied. Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman

Re: [PATCH 2/2] service: Reset service to idle state when retrying after a failure

2014-08-10 Thread Patrik Flykt
On Fri, 2014-08-08 at 15:51 +0300, Patrik Flykt wrote: > On Fri, 2014-08-08 at 14:02 +0200, Richard Röjfors wrote: > > > case CONNMAN_SERVICE_STATE_UNKNOWN: > > > case CONNMAN_SERVICE_STATE_IDLE: > > > - if (service->state

Re: [PATCH 2/2] service: Reset service to idle state when retrying after a failure

2014-08-08 Thread Patrik Flykt
On Fri, 2014-08-08 at 14:02 +0200, Richard Röjfors wrote: > > case CONNMAN_SERVICE_STATE_UNKNOWN: > > case CONNMAN_SERVICE_STATE_IDLE: > > - if (service->state == CONNMAN_SERVICE_STATE_FAILURE) > > - return -EINVAL; > > - break; > >

[PATCH 0/2] Fix retrying of a service when given wrong passphrase

2014-08-08 Thread Patrik Flykt
Hi, Here is a fix for CM-622, prepended by a simple code cleanup patch. Please test, Patrik Patrik Flykt (2): service: Expand switch case with all values service: Reset service to idle state when retrying after a failure src/service.c | 21 ++--- 1 file

[PATCH 2/2] service: Reset service to idle state when retrying after a failure

2014-08-08 Thread Patrik Flykt
A failed service that is reconnected has to be set to idle state before connecting it again. Changing state from failed to idle also has to be allowed. Unless this is done, a service already in failed state won't be able to detect that a subsequent reconnect also must re-trigger a new reconnect att

[PATCH 1/2] service: Expand switch case with all values

2014-08-08 Thread Patrik Flykt
Instead of using a default value, list all values and call the functions outside of the switch block. --- src/service.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/service.c b/src/service.c index 294ceca..0108fab 100644 --- a/src/service.c +++ b/src/se

Re: [PATCH v2] device: Make sure the device is up and running before enabling it

2014-08-08 Thread Patrik Flykt
On Thu, 2014-08-07 at 12:05 +0300, Tomasz Bursztyka wrote: > It can happen that, after a unproper ConnMan exit, a device is still up. > Once ConnMan is restarted cleanup_devices() will put this device down. > But then, it will never set it up again. Applied, thanks! Patrik __

Re: [PATCH] gsupplicant: Do P2P detection after interface property load

2014-08-08 Thread Patrik Flykt
On Wed, 2014-08-06 at 23:51 -0400, Eduardo Abinader wrote: > When interface was already created in wpa_supplicant, > p2p detection was failing. Thus, calling p2p detection > after interface property has been signaled fixes this > detection failure. Applied, thanks! Patrik ___

Re: [PATCH] wifi: Remove useless return statement in interface_added

2014-08-07 Thread Patrik Flykt
On Wed, 2014-08-06 at 23:31 -0400, Eduardo Abinader wrote: > Just code cleaning a meaningless return on the last > line of a void function. Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/l

Re: [PATCH] gsupplicant: Remove duplicated interface assignment on GroupStarted

2014-08-07 Thread Patrik Flykt
On Wed, 2014-08-06 at 23:58 -0400, Eduardo Abinader wrote: > Removing a previous interface assignment, although the correct value > was assigned at last. Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman

Re: [PATCH] gsupplicant: Fix the issue about get an invalid group structure

2014-08-07 Thread Patrik Flykt
On Thu, 2014-08-07 at 09:35 +0800, Guoqiang Liu wrote: > From: Guoqiang Liu > > peer->groups store group's path, not GSupplicantGroup, so get it > from group_mapping Applied, thanks! Patrik ___ connman mailing list connman@connman.net https:/

Re: [PATCH] peer: Switch to relevant states when disconnecting

2014-08-06 Thread Patrik Flykt
On Wed, 2014-08-06 at 13:30 +0300, Tomasz Bursztyka wrote: > Let's announce first we are disconnecting and, once done, that we are > idling again. Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/ma

Re: [PATCH v2 00/16] Peer's Agent API support

2014-08-06 Thread Patrik Flykt
On Wed, 2014-08-06 at 13:29 +0300, Tomasz Bursztyka wrote: > v2: fixed an issue around wps pin handling > > This patch-set add the Peer's Agent API documentation and implementation. > However, this only works in the context when ConnMan initiates the connection > and not the other way round (which

Re: [PATCH 05/16] agent: Provide a function for the Peer RequestPeerAuthorization call

2014-08-06 Thread Patrik Flykt
Hi, On Wed, 2014-08-06 at 13:29 +0300, Tomasz Bursztyka wrote: > This will be used by peer.c when there will be a need to choose between > WPS PBC or PIN. This choice will be raised to the user via an agent > RequestPeerAuthorization call. > --- > src/agent-connman.c | 167 > +++

Re: [PATCH] agent: The reply of the error callback might be NULL

2014-08-06 Thread Patrik Flykt
On Wed, 2014-08-06 at 13:11 +0300, Tomasz Bursztyka wrote: > This fixes a crash when calling connman_agent_cancel(), where > agent_finalize_pending() is called with a NULL reply which is then used > in the callback. Applied, thanks! Patrik ___

Re: [PATCH 0/2] P2P GC/GO mitigation fix

2014-08-06 Thread Patrik Flykt
On Wed, 2014-08-06 at 13:10 +0300, Tomasz Bursztyka wrote: > Hi, > > Last patch set messed up the GC/GO mitigation in gsupplicant/wifi, > ending up in a context where connman thinks it is always the GO. > > Thanks to Guoqiang Liu and Eduardo Abinader for reporting and testing this. Applied, than

Re: [PATCH] dhcp: Fixed Crash on Switching Network

2014-08-06 Thread Patrik Flykt
On Wed, 2014-08-06 at 14:29 +0530, Saurav Babu wrote: > Sometimes while switching network dhcp_initialize() fails because > interface is not up and hence dhcp->dhcp_client remains NULL. Here we > don't check return type of dhcp_initialize() and go on to call function > g_dhcp_client_start() and cra

Re: [PATCH] service: Fix service disconnection when using the same index

2014-08-06 Thread Patrik Flykt
On Tue, 2014-08-05 at 13:12 +0300, Patrik Flykt wrote: > When a service is to be connected, other service(s) using the same > interface will be disconnected. Fix the already connected or connecting > situation by ignoring the service in question when seen in the list. > > Sim

Re: [PATCH 0/2] Two DHCPv6 fixes

2014-08-06 Thread Patrik Flykt
On Mon, 2014-08-04 at 15:58 +0300, Patrik Flykt wrote: > Hi, > > Here are two patches fixing DHCPv6 T1 and T2 timer calculations. > With this default timer values should be used and proper timeouts > calculated. Both patches applied.

Re: Re: [PATCH] dhcp: Fixed Crash on Switching Network

2014-08-06 Thread Patrik Flykt
On Mon, 2014-08-04 at 11:16 +, Saurav Babu wrote: > Sometimes while switching network dhcp_initialize() fails because > interface is not up and hence dhcp->dhcp_client remains NULL. Here we > don't check return type of dhcp_initialize() and go on to call > function g_dhcp_client_start() and cra

Re: Re: [PATCH] dhcp: Fixed Crash on Switching Network

2014-08-06 Thread Patrik Flykt
Hi, Please do not send patches as attachments as the formatting gets mangled when I reply to your patch. On Mon, 2014-08-04 at 11:16 +, Saurav Babu wrote: > diff --git a/src/dhcp.c b/src/dhcp.c index 132b787..a3dd3c4 100644 --- > a/src/dhcp.c +++ b/src/dhcp.c @@ -587,6 +587,7 @@ int

Re: [PATCH] Fix UTF-8 ssid's

2014-08-05 Thread Patrik Flykt
On Wed, 2014-08-06 at 14:43 +1000, Lorn Potter wrote: > That code results in an ssid configured on the AP as LT-test-Å > which from wpa_supplicant is this: LT-test-\xc5 > to have at the end. That at the end is a representation of the UTF replacement character in whatever charset you terminal is

Re: [PATCH] service: Fix service disconnection when using the same index

2014-08-05 Thread Patrik Flykt
Hi, On Tue, 2014-08-05 at 10:42 +, Chengyi Zhao wrote: > Hi Patrik, > > > From: patrik.fl...@linux.intel.com > > To: connman@connman.net > > Subject: [PATCH] service: Fix service disconnection when using the same > > index > > Date: Tue, 5 Aug 2014 13:12:56 +0300 > > > > When a ser

Re: [PATCH] gsupplicant: Detect p2p support based on capability modes

2014-08-05 Thread Patrik Flykt
On Tue, 2014-08-05 at 00:20 -0400, Eduardo Abinader wrote: > The use of p2p_stop_find to detect p2p support > is not a trusted approach, due to p2p_stop_find currently > implemented in wpa_supplicant does not check p2p > availability, as p2p_find does, for instance. Therefore, > capabilitiy modes p

[PATCH] service: Fix service disconnection when using the same index

2014-08-05 Thread Patrik Flykt
When a service is to be connected, other service(s) using the same interface will be disconnected. Fix the already connected or connecting situation by ignoring the service in question when seen in the list. Simplify the index detection and signal a timeout when disconnect needs to happen first in

Re: [PATCH] dhcp: Return true if network not available

2014-08-04 Thread Patrik Flykt
On Mon, 2014-08-04 at 16:57 +0800, Guoqiang Liu wrote: > From: Guoqiang Liu > > Here give a true return value as P2P doesn't care about network, > but P2P DHCP client need to do ipconfig if DHCP successful. Applied, thanks. Patrik ___ connman

[PATCH 0/2] Two DHCPv6 fixes

2014-08-04 Thread Patrik Flykt
Hi, Here are two patches fixing DHCPv6 T1 and T2 timer calculations. With this default timer values should be used and proper timeouts calculated. Cheers, Patrik Patrik Flykt (2): dhcpv6: Fix timer calculation dhcpv6: Use proper default values fot T1 and T2 src/dhcpv6.c

[PATCH 2/2] dhcpv6: Use proper default values fot T1 and T2

2014-08-04 Thread Patrik Flykt
If T1 or T2 are not set by the server, use the recommended default DHCPv6 server values 0.5 and 0.8. See RFC 3315, section 22.4. Thanks to Dan Williams for reporting this issue. --- src/dhcpv6.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c

[PATCH 1/2] dhcpv6: Fix timer calculation

2014-08-04 Thread Patrik Flykt
Take into account the current and starting time when computing the next timeout. When T2 has elapsed, rebind should start immediately. Thanks to Dan Williams for reporting this. --- src/dhcpv6.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/dhcpv6

Re: [PATCH] wifi: Free g_hash_table_get_values on connect_peer

2014-08-04 Thread Patrik Flykt
On Fri, 2014-08-01 at 06:49 -0400, Eduardo Abinader wrote: > Glist returned from g_hash_table_get_values was not > being freed during p2p connect, causing a leak. Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://list

Re: [PATCH] supplicant: Return -ECANCELED when error message iterator is NULL

2014-08-04 Thread Patrik Flykt
On Fri, 2014-08-01 at 14:23 +0300, Patrik Flykt wrote: > On Fri, 2014-08-01 at 13:10 +0200, Richard Röjfors wrote: > > Except from that my name was incorrectly spelled, I ack this. > > Whoops. I'll fix. > > > A stack trace says more than 1000 words ;-) > >

Re: [PATCH] gsupplicant: Remove the dbus match when not needed

2014-08-04 Thread Patrik Flykt
On Fri, 2014-08-01 at 17:42 +0800, Guoqiang Liu wrote: > From: Guoqiang Liu > > Remove the dbus match when connman is no loger interested in. Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailm

Re: [PATCH] Fix UTF-8 ssid's

2014-08-04 Thread Patrik Flykt
Hi, On Mon, 2014-08-04 at 12:03 +1000, Lorn Potter wrote: > My device seems to using ANSI_X3.4-1968 Which one? The one (Jolla??) you run ConnMan on? > For an AP with ssid set to LT-Test-ÅÅЀ > > connman shows: LT-Test-Ѐ > > wpa_cli shows it as: LT-Test-\xc5\xc5Ѐ > > (on my laptop it's

Re: [PATCH] supplicant: Return -ECANCELED when error message iterator is NULL

2014-08-01 Thread Patrik Flykt
On Fri, 2014-08-01 at 13:10 +0200, Richard Röjfors wrote: > Except from that my name was incorrectly spelled, I ack this. Whoops. I'll fix. > A stack trace says more than 1000 words ;-) I could add that one too... Cheers, Patrik ___ connman

[PATCH] supplicant: Return -ECANCELED when error message iterator is NULL

2014-08-01 Thread Patrik Flykt
In normal cases when an error reply is received from wpa_supplicant, the code uses a DBusMessageIter struct from the stack and initializes it to point to the error return message in gsupplicant/dbus.c, method_call_reply(). When passed to parse_supplicant_error(), the iterator is valid, but contains

<    3   4   5   6   7   8   9   10   11   12   >