[PATCH 8/9] gdhcp: Decode RFC3397 domain-search names

2013-09-10 Thread Peter Meerwald
--- gdhcp/client.c | 108 ++-- gdhcp/common.c |1 + gdhcp/common.h |2 ++ 3 files changed, 108 insertions(+), 3 deletions(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index a3a4475..4ae03a4 100644 --- a/gdhcp/client.c +++ b/gdhcp/cli

[PATCH 5/9] ntp: Support NTPv3 protocol version

2013-09-10 Thread Peter Meerwald
NTPv3 is advertised by Windows 7, but only v4 is accepted rc/ntp.c:send_timeout() send timeout (retries 1) src/ntp.c:decode_msg() flags : 0x1c src/ntp.c:decode_msg() stratum : 1 src/ntp.c:decode_msg() poll : 1024.00 seconds (10) src/ntp.c:decode_msg() precision : 0.015625 seconds (-6) src/ntp.

[PATCH 0/9] misc patches

2013-09-10 Thread Peter Meerwald
patches 1, 2 are code cleanup patch 3 sets the domainname when provisioned in service (similar to domainname obtained by dhcp) patch 4 saves some unnecessary writes in dhcp option decoding (prepares for the search domain names in patches 7 to 9) patch 5 loosens the NTP protocol version check in

[PATCH 9/9] gdhcp: Set domain-search names

2013-09-10 Thread Peter Meerwald
--- src/dhcp.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/dhcp.c b/src/dhcp.c index c300357..27c7bef 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -301,7 +301,8 @@ static void lease_available_cb(GDHCPClient *dhcp_client, gpointer user_data) const

[PATCH 6/9] service: Show FallbackNameservers in service API

2013-09-10 Thread Peter Meerwald
--- src/service.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/src/service.c b/src/service.c index 42daadc..414d01f 100644 --- a/src/service.c +++ b/src/service.c @@ -1562,11 +1562,17 @@ static void append_dns(DBusMessageIter *iter, void *user_data) append_nameserv

[PATCH 7/9] dhcp: Request domain-search names according to RFC3397

2013-09-10 Thread Peter Meerwald
--- gdhcp/gdhcp.h |1 + src/dhcp.c|1 + 2 files changed, 2 insertions(+) diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index 0d79361..95aebb4 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -79,6 +79,7 @@ typedef enum { #define G_DHCP_HOST_NAME 0x0c #define G_DHCP_NTP_SERVER

[PATCH 4/9] gdhcp: Only write terminating NUL once at end of string

2013-09-10 Thread Peter Meerwald
--- gdhcp/client.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index e6106d1..a3a4475 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -1830,8 +1830,8 @@ static char *malloc_option_value_string(uint8_t *option, GDHCPOptionType type)

[PATCH 1/9] gdhcp: Drop OPTION_LIST, not used

2013-09-10 Thread Peter Meerwald
--- gdhcp/common.c |6 +++--- gdhcp/common.h |1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gdhcp/common.c b/gdhcp/common.c index 88fa2c2..6f30591 100644 --- a/gdhcp/common.c +++ b/gdhcp/common.c @@ -41,11 +41,11 @@ static const DHCPOption client_options[] = {

[PATCH 2/9] service: Cleanup, simplify code of final return in connman_service_get_timeservers()

2013-09-10 Thread Peter Meerwald
--- src/service.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/service.c b/src/service.c index e4d59cb..42daadc 100644 --- a/src/service.c +++ b/src/service.c @@ -2426,10 +2426,7 @@ char **connman_service_get_timeservers(struct connman_service *service) i

[PATCH 3/9] config: Call utsname_set_domainname() for domainname provisioned in service

2013-09-10 Thread Peter Meerwald
--- src/config.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index d6a3aa4..5f0f9f8 100644 --- a/src/config.c +++ b/src/config.c @@ -1212,8 +1212,10 @@ static void provision_service(gpointer key, gpointer value, __connman_service_s

[PATCH v4 0/8] Multiple agent support

2013-09-10 Thread Jukka Rissanen
Hi, this patchset implements multiple agent support. This means that multiple agents can be registered and connman directs user requests to best agent available. v4: - refactored set_default_gateway(), no functionality changes in patch 6 - commit message improved in patch 6 v3: - Removed and r

[PATCH v4 8/8] agent: Make sure we got an agent before asking user

2013-09-10 Thread Jukka Rissanen
--- src/agent-connman.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/agent-connman.c b/src/agent-connman.c index ca7570b..564abcc 100644 --- a/src/agent-connman.c +++ b/src/agent-connman.c @@ -421,7 +421,7 @@ int __connman_agent_request_passphrase_input(struct con

[PATCH v4 3/8] service: Unregister agent driver before removing service

2013-09-10 Thread Jukka Rissanen
Agent might have pending requests from service so we must unregister before cleaning up service hash. --- src/service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service.c b/src/service.c index e4d59cb..d821d1f 100644 --- a/src/service.c +++ b/src/service.c @@ -68

[PATCH v4 7/8] vpn: Make sure we got an agent before asking user

2013-09-10 Thread Jukka Rissanen
--- vpn/plugins/l2tp.c| 2 +- vpn/plugins/openconnect.c | 2 +- vpn/plugins/pptp.c| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c index 3fa39d7..f07055c 100644 --- a/vpn/plugins/l2tp.c +++ b/vpn/plugins/l2tp.c @@ -574,7

[PATCH v4 1/8] agent: Change the name of the agent struct

2013-09-10 Thread Jukka Rissanen
No functionality change by this commit. The name of the connman_agent struct is changed to connman_agent_request as that contains the request data. Following patches will introduce new agent struct that will contain data for each registered agent. --- src/agent.c | 16 1 file chan

[PATCH v4 5/8] agent: API changes required for multi agent support

2013-09-10 Thread Jukka Rissanen
Preparation for API changes in following commits. --- include/agent.h | 9 ++--- src/agent-connman.c | 23 --- src/agent.c | 14 ++ src/connman.h | 3 ++- src/service.c | 16 ++-- vpn/plugins/l2

[PATCH v4 4/8] vpn: Unregister agent driver before removing provider

2013-09-10 Thread Jukka Rissanen
Agent might have pending requests from provider so we must unregister before cleaning up provider hash. --- vpn/vpn-provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index 1769e53..96ea442 100644 --- a/vpn/vpn-provider.c +++

[PATCH v4 2/8] agent: Check that message exists before calling dbus

2013-09-10 Thread Jukka Rissanen
Dbus library will abort if dbus message reply is NULL so check that before calling dbus API. --- src/agent-connman.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/agent-connman.c b/src/agent-connman.c index 1169de9..664a5b3 100644 --- a/src/agent-connman.c +++ b/src/agent-connman.c @@

[PATCH v4 6/8] agent: Add multi agent support

2013-09-10 Thread Jukka Rissanen
User is able to register multiple agents to ConnMan. If user has registered an agent and is trying to connect a service via the same DBus id (inside same application), then user's own agent is consulted. If user has no agent registered, then default agent is used to query the user. Typically the de

Re: [PATCH v3 6/8] agent: Add multi agent support

2013-09-10 Thread Jukka Rissanen
On 10.09.2013 15:25, Patrik Flykt wrote: Hi, A longer commit message with an explanation of what is going on would be nice. On Tue, 2013-09-10 at 14:38 +0300, Jukka Rissanen wrote: +static void set_default_agent(struct connman_agent *agent) { - GList *item, *next; - stru

Re: [PATCH v3 6/8] agent: Add multi agent support

2013-09-10 Thread Patrik Flykt
Hi, A longer commit message with an explanation of what is going on would be nice. On Tue, 2013-09-10 at 14:38 +0300, Jukka Rissanen wrote: > +static void set_default_agent(struct connman_agent *agent) > { > - GList *item, *next; > - struct connman_agent_request *queued_req;

[PATCH v3 7/8] vpn: Make sure we got an agent before asking user

2013-09-10 Thread Jukka Rissanen
--- vpn/plugins/l2tp.c| 2 +- vpn/plugins/openconnect.c | 2 +- vpn/plugins/pptp.c| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c index 3fa39d7..f07055c 100644 --- a/vpn/plugins/l2tp.c +++ b/vpn/plugins/l2tp.c @@ -574,7

[PATCH v3 8/8] agent: Make sure we got an agent before asking user

2013-09-10 Thread Jukka Rissanen
--- src/agent-connman.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/agent-connman.c b/src/agent-connman.c index ca7570b..564abcc 100644 --- a/src/agent-connman.c +++ b/src/agent-connman.c @@ -421,7 +421,7 @@ int __connman_agent_request_passphrase_input(struct con

[PATCH v3 0/8] Multiple agent support

2013-09-10 Thread Jukka Rissanen
Hi, this patchset implements multiple agent support. This means that multiple agents can be registered and connman directs user requests to best agent available. v3: - Removed and refactored elect_default_agent() function and merged it to set_default_agent() in patch 6. The set_default_agent(

[PATCH v3 4/8] vpn: Unregister agent driver before removing provider

2013-09-10 Thread Jukka Rissanen
Agent might have pending requests from provider so we must unregister before cleaning up provider hash. --- vpn/vpn-provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index 1769e53..96ea442 100644 --- a/vpn/vpn-provider.c +++

[PATCH v3 2/8] agent: Check that message exists before calling dbus

2013-09-10 Thread Jukka Rissanen
Dbus library will abort if dbus message reply is NULL so check that before calling dbus API. --- src/agent-connman.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/agent-connman.c b/src/agent-connman.c index 1169de9..664a5b3 100644 --- a/src/agent-connman.c +++ b/src/agent-connman.c @@

[PATCH v3 5/8] agent: API changes required for multi agent support

2013-09-10 Thread Jukka Rissanen
Preparation for API changes in following commits. --- include/agent.h | 9 ++--- src/agent-connman.c | 23 --- src/agent.c | 14 ++ src/connman.h | 3 ++- src/service.c | 16 ++-- vpn/plugins/l2

[PATCH v3 1/8] agent: Change the name of the agent struct

2013-09-10 Thread Jukka Rissanen
No functionality change by this commit. The name of the connman_agent struct is changed to connman_agent_request as that contains the request data. Following patches will introduce new agent struct that will contain data for each registered agent. --- src/agent.c | 16 1 file chan

[PATCH v3 6/8] agent: Add multi agent support

2013-09-10 Thread Jukka Rissanen
User is able to register multiple agents to ConnMan. When ConnMan needs to ask something from the user, it uses the nearest agent available. --- src/agent-connman.c | 4 +- src/agent.c | 490 2 files changed, 341 insertions(+), 153 del

[PATCH v3 3/8] service: Unregister agent driver before removing service

2013-09-10 Thread Jukka Rissanen
Agent might have pending requests from service so we must unregister before cleaning up service hash. --- src/service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service.c b/src/service.c index e4d59cb..d821d1f 100644 --- a/src/service.c +++ b/src/service.c @@ -68