Re: [PATCH v2 01/14] main: Use signalfd instead of plain signals

2011-07-01 Thread Marcel Holtmann
Hi Daniel, > It's unsafe to call syslog in the terminat signal handler > because syslog takes an lock. So when the signal handler > kicks in and we were already in syslog, we have a nice > deadlock. > --- > src/main.c | 59 +++ > 1 files c

Re: [PATCH 1/2] gresolv: added the capability to restrict the results to a specific address family.

2011-07-01 Thread Marcel Holtmann
Hi Tomasz, please shorten the subject line. If anything that is show via git log goes over 78 characters terminal wide then it don't like it. Better have a short subject and a detailed explanation. General rule is that subjects should not be more than 60 characters. > --- > gweb/gresolv.c | 26

Re: [PATCH 2/2] Use priority string to provide wide compatibility

2011-07-01 Thread Marcel Holtmann
Hi Lucas, > This priority string will only enable SSL 3.0 and TLS 1.0 as protocols > and will disable, via the %COMPAT keyword, several TLS protocol options > that are known to cause compatibility problems. > > Reference: > http://www.gnu.org/software/gnutls/manual/html_node/Interoperability.htm

Re: [PATCH 1/2] Remove call to deprecated function

2011-07-01 Thread Marcel Holtmann
Hi Lucas, > If we use gnutls 2.12.0 or later it's necessary to call > gnutls_transport_set_lowat() to disable the lowat functionality. Since > this function is deprecated in new versions of gnutls, call it only if > using an older version. > --- > gweb/giognutls.c |2 ++ > 1 files changed, 2

Re: [PATCH 1/2] Remove call to deprecated function

2011-07-01 Thread Lucas De Marchi
On Fri, Jul 1, 2011 at 8:50 PM, Lucas De Marchi wrote: > If we use gnutls 2.12.0 or later it's necessary to call > gnutls_transport_set_lowat() to disable the lowat functionality. Since > this function is deprecated in new versions of gnutls, call it only if > using an older version. > --- >  gweb

[PATCH 2/2] Use priority string to provide wide compatibility

2011-07-01 Thread Lucas De Marchi
This priority string will only enable SSL 3.0 and TLS 1.0 as protocols and will disable, via the %COMPAT keyword, several TLS protocol options that are known to cause compatibility problems. Reference: http://www.gnu.org/software/gnutls/manual/html_node/Interoperability.html#Interoperability ---

[PATCH 1/2] Remove call to deprecated function

2011-07-01 Thread Lucas De Marchi
If we use gnutls 2.12.0 or later it's necessary to call gnutls_transport_set_lowat() to disable the lowat functionality. Since this function is deprecated in new versions of gnutls, call it only if using an older version. --- gweb/giognutls.c |2 ++ 1 files changed, 2 insertions(+), 0 deletion

[PATCH 2/2] gweb: applying address family restiction to resolver (using g_resolv_set_address_family)

2011-07-01 Thread Tomasz Bursztyka
--- gweb/gweb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/gweb/gweb.c b/gweb/gweb.c index 536de00..34288bf 100644 --- a/gweb/gweb.c +++ b/gweb/gweb.c @@ -294,6 +294,8 @@ gboolean g_web_set_address_family(GWeb *web, int family) web->family = family; +

[PATCH 1/2] gresolv: added the capability to restrict the results to a specific address family.

2011-07-01 Thread Tomasz Bursztyka
--- gweb/gresolv.c | 26 ++ gweb/gresolv.h |2 ++ 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/gweb/gresolv.c b/gweb/gresolv.c index a334d84..42a3757 100644 --- a/gweb/gresolv.c +++ b/gweb/gresolv.c @@ -62,6 +62,8 @@ struct resolv_lookup { G

[PATCH 0/2] gweb/gresolv consistency against address family restiction.

2011-07-01 Thread Tomasz Bursztyka
Hi, Here is two patches to make address family restriction consistent in both gweb and gresolv. First patch adds g_resolv_set_address_family() and second one add its usage inside g_web_set_address_family() so the resolver in gweb gets the restriction applied too. Please review, Tomasz Burszt

[PATCH v2 14/14] ofono: Fix network owner ship

2011-07-01 Thread Daniel Wagner
--- plugins/ofono.c | 51 ++- 1 files changed, 42 insertions(+), 9 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index 7efb265..68acba5 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -335,6 +335,36 @@ static struct connman_dev

[PATCH v2 13/14] wifi: Fix network owner ship

2011-07-01 Thread Daniel Wagner
--- plugins/wifi.c | 39 +++ 1 files changed, 27 insertions(+), 12 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index edea4e7..c5c0273 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -61,6 +61,7 @@ struct wifi_data { struct connman_de

[PATCH v2 12/14] bluetooth: Fix remove device/network

2011-07-01 Thread Daniel Wagner
--- plugins/bluetooth.c | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index 39833a0..cdb20ff 100644 --- a/plugins/bluetooth.c +++ b/plugins/bluetooth.c @@ -599,6 +599,36 @@ static gboolean devic

[PATCH v2 11/14] network: Fix double free in network_destruct()

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner --- src/network.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/network.c b/src/network.c index 448c54c..c0c2773 100644 --- a/src/network.c +++ b/src/network.c @@ -332,7 +332,6 @@ static void network_destruct(struct connman_network *network)

[PATCH v2 09/14] bluetooth: Unref network objects

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner The bluetooth plugin creates the network object therefore it should also unref (destroy) it. --- plugins/bluetooth.c | 18 +++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index 65a9d5d..39833a0 100

[PATCH v2 10/14] device: Reorder cleanup

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner If free_network is called before the driver->disable() callback the device has been removed from the networking structure. --- src/device.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index a2e9386..241cd8c 100644 --

[PATCH v2 08/14] device: Change signature of connman_device_remove_network()

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner --- include/device.h|2 +- plugins/bluetooth.c |6 ++ plugins/ethernet.c |5 + plugins/ofono.c |5 ++--- plugins/wifi.c | 14 +++--- src/device.c|8 6 files changed, 17 insertions(+), 23 deletions(-) diff -

[PATCH v2 07/14] ethernet: Take ownership of network objects

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner Therefore destroy network objects when the carrier goes offline. --- plugins/ethernet.c | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/plugins/ethernet.c b/plugins/ethernet.c index 2ccd498..5c02640 100644 --- a/plugins/ether

[PATCH v2 06/14] device: Remove needless call to __connman_network_set_device()

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner --- src/device.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 386be44..ada9233 100644 --- a/src/device.c +++ b/src/device.c @@ -1116,8 +1116,6 @@ int connman_device_remove_network(struct connman_device *device,

[PATCH v2 05/14] network: Remove connman_network_register/unregiser()

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner Since the service object doesn't take a reference the intermediate step of having a connman_network_register/unregister is not needed. This function are only there to have an additional step where probe()/remove() will be called. This is the job of connman_device_add_network()

[PATCH v2 03/14] device: Update network pointer in service

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner I don't think this is a good solution because the magic to choose the right network for the service shouldn't be part of device. Maybe passing the networks to service to select the right one would be better? --- src/device.c | 28 1 files change

[PATCH v2 04/14] service: Don't ref/unref network objects

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner which were created by the plugins. The hidden wifi networks will be created by service and therefore service is the owner of the network objects and does the unref when the service is destroyed. --- src/service.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)

[PATCH v2 02/14] device: Fix a inbalance of ref/unref of network objects

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner The destroy callback of the hash table (device->networks) will unref and unregister the network object. --- src/device.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/device.c b/src/device.c index 6e52164..a35ef65 100644 --- a/src/device.c +

[PATCH v2 01/14] main: Use signalfd instead of plain signals

2011-07-01 Thread Daniel Wagner
It's unsafe to call syslog in the terminat signal handler because syslog takes an lock. So when the signal handler kicks in and we were already in syslog, we have a nice deadlock. --- src/main.c | 59 +++ 1 files changed, 51 insertions(+),

[PATCH v2 00/14] Refcounting simplified

2011-07-01 Thread Daniel Wagner
From: Daniel Wagner Hi, here is an update on this serie. I'm not happy with patch number 3. The rest should be updated according the feedback I got. cheers, daniel Daniel Wagner (14): main: Use signalfd instead of plain signals device: Fix a inbalance of ref/unref of network objects d

Re: [PATCH 1/2] gresolv: added the capability to restrict the results to a specific address family.

2011-07-01 Thread Marcel Holtmann
Hi Tomasz, > >> gboolean g_resolv_cancel_lookup(GResolv *resolv, guint id); > >> > >> +gboolean g_resolv_set_result_address_family(GResolv *resolv, int family); > >> + > > why is not using g_web_set_address_family() enough and just restrict > > outgoing and result at the same time? > gweb is no

Re: [RFC v1 5/5] service: Introduce post processing ipconfig changes

2011-07-01 Thread Marcel Holtmann
Hi Jussi, > >> + g_queue_push_tail(service->ipconfig_state_queue, data); > >> + > >> + /* XXX This is just a stupid idea: Let's defer everything by 1 second. > >> */ > >> + g_timeout_add_seconds(1, ipconfig_queue_process, service); > > > > could not agree more ;) > > > > However a g_timeout_

Re: [RFC v1] Fix triggering of identity/passphrase query from agent

2011-07-01 Thread Samuel Ortiz
Hi Henri, On Fri, Jul 01, 2011 at 09:25:26AM +0300, Henri Bragge wrote: > > > Another, cleaner way could be to add new fields for agent provided > > > identity/passphrase in service struct (agent_identity/agent_passphrase) > > > and network ("WiFi.AgentIdentity" and "WiFi.AgentPassphrase"). > > I

[RFC 2/4] service: Helper function for detecting network connectivity

2011-07-01 Thread patrik . flykt
From: Patrik Flykt In order to connect a provider/VPN, ConnMan needs to have a IP network connection through any of the services associated with a network. --- include/service.h |1 + src/service.c | 27 +++ 2 files changed, 28 insertions(+), 0 deletions(-) dif

[RFC 4/4] Test triggering service if it has a provider

2011-07-01 Thread patrik . flykt
From: Patrik Flykt --- src/session.c | 22 +++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/session.c b/src/session.c index 8376bf7..33f7171 100644 --- a/src/session.c +++ b/src/session.c @@ -865,6 +865,22 @@ static void select_and_connect(struct connm

[RFC 3/4] session: Check that there is a connection before connecting VPN

2011-07-01 Thread patrik . flykt
From: Patrik Flykt Check that at least some service is connected before attempting to connect a proviver/VPN service. --- src/session.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/session.c b/src/session.c index e266190..8376bf7 100644 --- a/src/session.c

[RFC 1/4] session: Highest weight for VPN service type

2011-07-01 Thread patrik . flykt
From: Patrik Flykt --- src/session.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/session.c b/src/session.c index fb12d3c..e266190 100644 --- a/src/session.c +++ b/src/session.c @@ -568,6 +568,8 @@ static int service_type_weight(enum connman_service_type type)

[RFC 0/4] VPN support for session, take 1

2011-07-01 Thread patrik . flykt
From: Patrik Flykt Hi, Here is a first rough take on VPN support for sessions. The VPN support assumes there are already VPN services created beforehand, i.e. configured via ConnectProvider before session mode is enabled. I'm thinking that a VPN should be sorted to the session service

[PATCH v1] technology: Redo offlinemode logic.

2011-07-01 Thread Alok Barsode
From: Alok Barsode Traverse the list of technologies and enable/disable each instead of traversing the device list. --- src/connman.h|5 ++--- src/device.c | 43 --- src/manager.c|4 +--- src/profile.c|6 +- src/technology

Re: [PATCH 1/2] gresolv: added the capability to restrict the results to a specific address family.

2011-07-01 Thread Tomasz Bursztyka
Hi Marcel, >> gboolean g_resolv_cancel_lookup(GResolv *resolv, guint id); >> >> +gboolean g_resolv_set_result_address_family(GResolv *resolv, int family); >> + > why is not using g_web_set_address_family() enough and just restrict > outgoing and result at the same time? gweb is not used in wpad

[PATCH 1/5] provider: Fix memory leak; free provider->host in provider destruct

2011-07-01 Thread patrik . flykt
From: Patrik Flykt --- src/provider.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/provider.c b/src/provider.c index afbfeeb..5bc8c40 100644 --- a/src/provider.c +++ b/src/provider.c @@ -156,6 +156,7 @@ static void provider_destruct(struct connman_provider *provi

[PATCH 2/5] provider: Properly set host and domain provider members

2011-07-01 Thread patrik . flykt
From: Patrik Flykt Detect 'Host' and 'VPN.Domain' strings being set and insert them properly into the provider structure. Also ensure that the strings corresponding to provider structure members are not duplicated into the provider string settings hash. --- src/provider.c | 11 --- 1 f

[PATCH 4/5] session: Correct GSequence sorting to use service_entry structs

2011-07-01 Thread patrik . flykt
From: Patrik Flykt The items on session->service_list GSequence are of type service_entry. Fix sorting function to cast the items correctly. --- src/session.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/session.c b/src/session.c index 91758e2..45bcc0e 10064

[PATCH 5/5] session: Service type to bearer string conversion support

2011-07-01 Thread patrik . flykt
From: Patrik Flykt --- src/session.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/session.c b/src/session.c index 45bcc0e..fb12d3c 100644 --- a/src/session.c +++ b/src/session.c @@ -196,6 +196,8 @@ static enum connman_service_type bearer2service(const char *b

[PATCH 3/5] provider: Get 'Host' and 'VPN.Domain' from provider struct

2011-07-01 Thread patrik . flykt
From: Patrik Flykt --- src/provider.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/provider.c b/src/provider.c index 39b9a9b..1e58b8c 100644 --- a/src/provider.c +++ b/src/provider.c @@ -644,6 +644,10 @@ const char *connman_provider_get_string(struct connman_p

[PATCH 0/5] Bug fixes for provider.c and session.c

2011-07-01 Thread patrik . flykt
From: Patrik Flykt Hi, Here is a bunch of bug fixes for various issues found in provider.c and session.c. The fixes for provider.c were sent earlier as part of the provider save/load support, but I'm sending them here anyway because they are independent of those changes. Especially imp

Re: [RFC v1 5/5] service: Introduce post processing ipconfig changes

2011-07-01 Thread Jussi Kukkonen
On 06/30/2011 11:45 PM, Marcel Holtmann wrote: > Hi Daniel, > > > >> + >> +g_queue_push_tail(service->ipconfig_state_queue, data); >> + >> +/* XXX This is just a stupid idea: Let's defer everything by 1 second. >> */ >> +g_timeout_add_seconds(1, ipconfig_queue_process, service); >

[PATCH 4/4] service: separating the ipconfig state handling logic and the service state one.

2011-07-01 Thread Tomasz Bursztyka
In previous patch, __connman_service_ipconfig_indicate_state() was introduced. Now the ipconfig state logic which was in __connman_service_indicate_state() has been moved there. If relevant, __connman_service_indicate_state() will be called from __connman_service_ipconfig_indicate_state(). Now, a s

[PATCH 3/4] service: Use __connman_service_ipconfig_indicate_state()

2011-07-01 Thread Tomasz Bursztyka
--- src/connection.c |6 -- src/connman.h|2 -- src/location.c |2 +- src/network.c| 52 src/provider.c |6 +++--- src/service.c| 48 6 files changed, 52 in

[PATCH 2/4] service: Add __connman_service_ipconfig_indicate_state().

2011-07-01 Thread Tomasz Bursztyka
--- src/connman.h |4 src/service.c | 44 2 files changed, 48 insertions(+), 0 deletions(-) diff --git a/src/connman.h b/src/connman.h index 0c6d6b1..4cc2429 100644 --- a/src/connman.h +++ b/src/connman.h @@ -497,6 +497,10 @@ void __connman_

[PATCH 1/4] monitor-connman: Parse Notification messages.

2011-07-01 Thread Tomasz Bursztyka
--- test/monitor-connman | 47 +-- 1 files changed, 45 insertions(+), 2 deletions(-) diff --git a/test/monitor-connman b/test/monitor-connman index cf8f7a6..4d44519 100755 --- a/test/monitor-connman +++ b/test/monitor-connman @@ -7,12 +7,54 @@ import

[PATCH 0/4] Service State Machine Transition NG - new

2011-07-01 Thread Tomasz Bursztyka
Hi Daniel, Samuel and Marcel, I reworked Daniel's patches. So the 3 first ones are exactly doing the same, it's just updated to apply with latest master's HEAD. The big change is in patch 4, and I think this is the right way to proceed: separating ipconfig state handling and service state handl