[PATCH 00/11 - v2] Technology: Handle fully and properly rfkill events

2012-10-11 Thread Tomasz Bursztyka
Hi, Here a version 2 of the previous patchset. Same as the original with a 11th patch. When adding an rfkill, it's no use to recompute the hardblocked state the same way as in an rfkill update. At that point it's mandatory to follow whats the state of each rfkill switch, so if one rfkill

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

2012-10-11 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

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

2012-10-11 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

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

2012-10-11 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 04/11] technology: Refactor rfkill event handling according to soft/hard block

2012-10-11 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/11] technology: Refactor and split functions setting enabled state

2012-10-11 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

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

2012-10-11 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 09/11] technology: Handle fully and properly rfkill driven state

2012-10-11 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

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

2012-10-11 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

[PATCH 11/11] technology: Compute differently hardblocked state on rfkill add event

2012-10-11 Thread Tomasz Bursztyka
If harblocked and a new device is inserted and detected as not hardblocked, then it will be possible to enable/disable it (soft rfkill) independantly to the main hw rfkill switch. It applies also when ConnMan starts, so it gets the right hardblocked state. --- src/technology.c | 30

[PATCH v5 0/5] clang compile fixes

2012-10-11 Thread Jukka Rissanen
Hi, v5: - patch order changed - new patch (#4) that replaces dhcp_add_simple_option() with three variants for different data sizes (uint8, uint16 and uint32) v4: - remove inclusion guard from header file (#1) - really remove unneccesary cast in client.c (#2) - use host byte order internally

[PATCH v5 1/5] gdhcp: Remove obsolete load lease function

2012-10-11 Thread Jukka Rissanen
--- gdhcp/gdhcp.h | 2 -- gdhcp/server.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index 169b81f..f011690 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -186,8 +186,6 @@ int g_dhcp_server_set_option(GDHCPServer *server, unsigned

[PATCH v5 2/5] gdhcp: Add unalignment macros

2012-10-11 Thread Jukka Rissanen
The alignment macros are copied from Bluez. --- Makefile.am | 2 +- gdhcp/unaligned.h | 163 ++ 2 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 gdhcp/unaligned.h diff --git a/Makefile.am b/Makefile.am index

[PATCH v5 4/5] gdhcp: Use data size specific option setting function

2012-10-11 Thread Jukka Rissanen
Instead of using dhcp_add_simple_option() the gdhcp now uses three functions for setting uint8, uint16 and uint32 values. --- gdhcp/client.c | 13 +- gdhcp/common.c | 75 ++ gdhcp/common.h | 6 - gdhcp/server.c | 9 +++ 4

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

2012-10-11 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

Re: ConnMan 1.7 and Ofono 1.11

2012-10-11 Thread alok barsode
hi Daniel, On Thu, Oct 11, 2012 at 2:29 AM, Daniel Wagner w...@monom.org wrote: On 10.10.2012 18:44, alok barsode wrote: Hi, I am trying to get my Ericsson F3607gw USB dongle to work with ConnMan. I can enable the modem and also able to get it online from the ofono tests. But the modem or

Re: ConnMan 1.7 and Ofono 1.11

2012-10-11 Thread Daniel Wagner
On 11.10.2012 15:49, alok barsode wrote: hi Daniel, On Thu, Oct 11, 2012 at 2:29 AM, Daniel Wagner w...@monom.org mailto:w...@monom.org wrote: On 10.10.2012 18:44, alok barsode wrote: Hi, I am trying to get my Ericsson F3607gw USB dongle to work with ConnMan. I

[PATCH] nat: Memory leak when cleaning up

2012-10-11 Thread Jukka Rissanen
The nat struct was not freed when it is was removed from the hash. --- src/nat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nat.c b/src/nat.c index e17a3f8..927d305 100644 --- a/src/nat.c +++ b/src/nat.c @@ -196,6 +196,7 @@ static void cleanup_nat(gpointer data)

[PATCH] wispr: Avoid possible crash by not passing wispr context around

2012-10-11 Thread Jukka Rissanen
We cannot pass the wp_context directly to callback because the network might have been disconnected already and wp_context would have been freed already in that case. --- src/wispr.c | 47 +-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 14/34] provider: Move around server and user route handling

2012-10-11 Thread Patrik Flykt
Hi, On Thu, 2012-10-04 at 12:56 +0300, Jukka Rissanen wrote: --- include/provider.h | 10 ++ plugins/vpn.c | 292 +++- src/provider.c | 42 +-- vpn/vpn-provider.c | 352 ++---

Re: [PATCH 15/34] vpn: Resolve vpn hostname if necessary

2012-10-11 Thread Patrik Flykt
On tor, 2012-10-04 at 12:56 +0300, Jukka Rissanen wrote: + /* +* We cannot unref the resolver here as resolv struct is manipulated +* by gresolv.c after we return from this callback. +*/ + g_timeout_add_seconds(0, remove_resolv, data); We want to fix

Re: [PATCH v5 3/5] gdhcp: Use host byte order internally

2012-10-11 Thread Marcel Holtmann
Hi Jukka, Convert to network byte order just before sending the packet. --- gdhcp/client.c | 47 +-- gdhcp/common.c | 20 +++- gdhcp/common.h | 17 + gdhcp/ipv4ll.c | 4 ++-- gdhcp/server.c | 41

Re: [PATCH v5 0/5] clang compile fixes

2012-10-11 Thread Marcel Holtmann
Hi Jukka, v5: - patch order changed - new patch (#4) that replaces dhcp_add_simple_option() with three variants for different data sizes (uint8, uint16 and uint32) v4: - remove inclusion guard from header file (#1) - really remove unneccesary cast in client.c (#2) - use host byte