Re: [PATCH 5/9] main.conf: Add SingleConnection description

2012-10-09 Thread Patrik Flykt
On Mon, 2012-10-08 at 15:37 +0200, Marcel Holtmann wrote: > explain what this does in simpler English to me. I am not really > getting why we would need this and what good does it do. The feature was requested by a customer, apparently they want to disconnect all other connections so that they are

Re: [PATCH] doc: State is a string type

2012-10-09 Thread Patrik Flykt
On ons, 2012-10-03 at 17:42 -0300, Gustavo Padovan wrote: > From: Gustavo Padovan Applied, thanks! Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman

[PATCH 01/10] technology: Refactor how technology is set to enable or disable

2012-10-09 Thread Tomasz Bursztyka
Factorize how a device list is enabled/disabled: this will be useful for coming patches. Simplify also the code, and remove useless gotos. --- src/technology.c | 66 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/src/technol

[PATCH 00/10] Technology: Handle fully and properly rfkill events

2012-10-09 Thread Tomasz Bursztyka
Hi, Here is a fix for handling properly rfkill events. Currently, all technologies are handled the same way, whether they are related to rfkill events or not. If the backend (wpa_s, bluetoothd...) dies: technology is set as unpowered. However, in case of rfkill driven technology: the switch can

[PATCH 03/10] technology: Add and handle a marker for softblock status

2012-10-09 Thread Tomasz Bursztyka
--- src/technology.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/technology.c b/src/technology.c index 4c74912..becd9df 100644 --- a/src/technology.c +++ b/src/technology.c @@ -74,6 +74,7 @@ struct connman_technology { GSList *scan_pending;

[PATCH 02/10] technology: Add a marker to know if a technology is rfkill driven

2012-10-09 Thread Tomasz Bursztyka
Useful for coming patches: enabling/disabling technologies will be done differently whether technology is rfkill driven or not: - if rfkill driven -> enabled will rely on rfkill states - if not -> enabled will rely on driver/devices states --- src/technology.c | 5 + 1 file changed, 5 insertio

[PATCH 04/10] technology: Refactor rfkill event handling according to soft/hard block

2012-10-09 Thread Tomasz Bursztyka
No need to proceed with softblocked if technology is already hardblocked. Apply offlinemode and persistant state according to softblocked state. (saner logic and helped to cleanup code from style point of view too) --- src/technology.c | 57 ++--

[PATCH 05/10] technology: Refactor and split functions setting enabled state

2012-10-09 Thread Tomasz Bursztyka
--- src/technology.c | 54 +- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/src/technology.c b/src/technology.c index 015f1c4..4aac1b9 100644 --- a/src/technology.c +++ b/src/technology.c @@ -1198,41 +1198,37 @@ static void powe

[PATCH 06/10] technology: Change enabled as a boolean and refactor accordingly

2012-10-09 Thread Tomasz Bursztyka
--- src/technology.c | 45 - 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/src/technology.c b/src/technology.c index 4aac1b9..3440dd5 100644 --- a/src/technology.c +++ b/src/technology.c @@ -55,7 +55,7 @@ struct connman_technology {

[PATCH 07/10] technology: Use the right method to enable or disable

2012-10-09 Thread Tomasz Bursztyka
If rfkill driven, it will use rfkill soft block/unblock. If not it will request the device to get enabled or disabled. --- src/technology.c | 49 +++-- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/src/technology.c b/src/technology.c in

[PATCH 08/10] device: Add a getter for powered property

2012-10-09 Thread Tomasz Bursztyka
--- include/device.h | 1 + src/device.c | 5 + 2 files changed, 6 insertions(+) diff --git a/include/device.h b/include/device.h index 5339e98..470059b 100644 --- a/include/device.h +++ b/include/device.h @@ -80,6 +80,7 @@ const char *connman_device_get_ident(struct connman_device *devi

[PATCH 09/10] technology: Handle fully and properly rfkill driven state

2012-10-09 Thread Tomasz Bursztyka
--- src/technology.c | 52 +++- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/src/technology.c b/src/technology.c index 3f41b96..ff0e134 100644 --- a/src/technology.c +++ b/src/technology.c @@ -1196,6 +1196,9 @@ int __connman_technol

[PATCH 10/10] technology: Recompute hardblocked state on rfkill remove event

2012-10-09 Thread Tomasz Bursztyka
This fixes the case of cascading rfkill switches: if enabled, hard rfkilling such technology might generate contradictory events. 1 - first all switches are hardblocked 2 - then one of these switch (usually: device's switch) gets fully unblocked 3 - then this same switch gets removed Step 2 is in

[PATCH] rfkill: Return the error when write() fails

2012-10-09 Thread Tomasz Bursztyka
--- src/rfkill.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/rfkill.c b/src/rfkill.c index 77c5b92..8d4c90d 100644 --- a/src/rfkill.c +++ b/src/rfkill.c @@ -165,7 +165,7 @@ int __connman_rfkill_block(enum connman_service_type type, connman_bool_t block)

Re: [PATCH 06/34] test: Renamed old VPN scripts

2012-10-09 Thread Patrik Flykt
Hi, On Thu, 2012-10-04 at 12:56 +0300, Jukka Rissanen wrote: > diff --git a/test/remove-provider b/test/remove-provider > new file mode 100755 > index 000..9a6620c > --- /dev/null > +++ b/test/remove-provider > @@ -0,0 +1,21 @@ > +#!/usr/bin/python > + > +import sys > +import dbus > +

Re: [PATCH 01/34] doc: VPN daemon API descriptions

2012-10-09 Thread Patrik Flykt
Hi, On Thu, 2012-10-04 at 12:56 +0300, Jukka Rissanen wrote: > + array{string} Nameservers [readonly] > + > + The list of currently active nameservers. > + This is a list of nameservers that the VPN has set, they are not necessarily the active ones as

[PATCH v2 0/3] clang compile fixes

2012-10-09 Thread Jukka Rissanen
Hi, Patch #1 creates new put_unaligned and get_unaligned macros which can convert between big-endian or little-endian values. The macros are copied from kernel. Patch #2 adds the alignment macros into gdhcp code. Patch #3 downgrades cast-align and unused-value errors into warnings so that we can

[PATCH v2 1/3] core: Add unalignment macros

2012-10-09 Thread Jukka Rissanen
These come from kernel include/linux/unalignment directory. --- Makefile.am | 7 ++- include/unaligned.h | 54 +++ include/unaligned_be_byteshift.h | 90 +++ include/unaligned_be_struct.h | 58 +++

[PATCH v2 2/3] gdhcp: Use unalignment macros from unaligned.h

2012-10-09 Thread Jukka Rissanen
--- gdhcp/client.c | 17 +++-- gdhcp/common.c | 19 +++ gdhcp/common.h | 16 gdhcp/server.c | 8 4 files changed, 26 insertions(+), 34 deletions(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index cf04ced..801d652 100644 --- a/gdhcp/client.

[PATCH v2 3/3] build: Ignore cast-align and unused-value errors if clang is used

2012-10-09 Thread Jukka Rissanen
The clang compiler gives too many false errors atm. So downgrade cast-align and unused-value errors into warnings. This is done like this right now but should be fixed later. --- configure.ac | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 47710bb..f9570

Re: [PATCH 5/9] main.conf: Add SingleConnection description

2012-10-09 Thread Marcel Holtmann
Hi Patrik, > > explain what this does in simpler English to me. I am not really > > getting why we would need this and what good does it do. > > The feature was requested by a customer, apparently they want to > disconnect all other connections so that they are left with only one at > a time. It'

Re: [PATCH v2 1/3] core: Add unalignment macros

2012-10-09 Thread Marcel Holtmann
Hi Jukka, > These come from kernel include/linux/unalignment directory. > --- > Makefile.am | 7 ++- > include/unaligned.h | 54 +++ > include/unaligned_be_byteshift.h | 90 > +++ > include/unaligned_be

Re: [PATCH v2 2/3] gdhcp: Use unalignment macros from unaligned.h

2012-10-09 Thread Marcel Holtmann
Hi Jukka, > gdhcp/client.c | 17 +++-- > gdhcp/common.c | 19 +++ > gdhcp/common.h | 16 > gdhcp/server.c | 8 > 4 files changed, 26 insertions(+), 34 deletions(-) > > diff --git a/gdhcp/client.c b/gdhcp/client.c > index cf04ced..801d652 100