Re: [PATCH 0/4] Rfkilling technology fixes

2012-10-01 Thread Jussi Kukkonen
On Fri, Sep 28, 2012 at 3:35 PM, Tomasz Bursztyka wrote: > Hi, > > While playing around with enabling/disabling technology I found out that if a > technology is hardblocked through the physical switch, > first the technology is still listed in GetTechnologies, but of course > enabling it > from

[PATCH] test: Check test-connman arguments

2012-10-01 Thread patrik . flykt
From: Patrik Flykt Check test-connman offlinemode arguments and the number of arguments in general. Fixes BMC#25723 --- test/test-connman | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/test/test-connman b/test/test-connman index 67b0c85..d047c

[PATCH v0 01/24] session: Handle destruction of policy during shutdown

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner During shutdown, e.g. ctrl-c was issued by the user, pugins are removed first. The policy plugin will destroy the associated policy config, therefore there is no need to do it later. Accessing the session->policy NULL pointer later is not a good idea anyway. --- src/session.

[PATCH v0 00/24] Policy IVI Plugin

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner Hi, This series introduces a PoC for a new policy plugin. I have called it IVI but that is nothing specific to IVI. It just a very good short name. If you have a better name, I am glad to accept it. The first few patches are bug fixes ore small cleanups in general. So up to

[PATCH v0 02/24] session: Add callback to policy create()

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner Instead returning directly a config when create() is called in policy plugin, use a callback function for handing over a valid configuration from the plugin to the session core. This prepars support for asynchronize create call. --- include/session.h| 9 +++-- pl

[PATCH v0 03/24] session: Factor out user settings in __connman_session_create()

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- src/session.c | 50 ++ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/src/session.c b/src/session.c index 8957c71..f5d3a6d 100644 --- a/src/session.c +++ b/src/session.c @@ -1543,6 +1543,14 @@ static const G

[PATCH v0 04/24] session: Factor out memore release part of cleanup_session

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner We want to use this code snippet for the error case in __connman_session_create() too. --- src/session.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/session.c b/src/session.c index f5d3a6d..314a51d 100644 --- a/src/session.

[PATCH v0 05/24] manager: Allow async CreateSession method call

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner The creation of a new session might be deferred. This happens in the case where a policy plugin has to do some work async. For example the plugin might have to ask a D-Bus config daemon. --- src/manager.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --g

[PATCH v0 06/24] session: Register session after policy plugin return config

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner Move the configuration part of __connman_session_create() into session_create_cb(). With this change the policy plugin is able to do async work to retrieve a configuration. --- src/session.c | 187 -- 1 file changed, 102

[PATCH v0 07/24] session: Handle NULL config pointer

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- src/session.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/session.c b/src/session.c index 601a373..29d98ea 100644 --- a/src/session.c +++ b/src/session.c @@ -1572,6 +1572,11 @@ static void session_create_cb(struct connman_session *session, DBG(

[PATCH v0 08/24] session: Update sessions on config updates

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner Give the policy plugin a way to inform the session core that some of the config values have changed. This could be done in a more clever way, e.g. figure out only to update the necessary info entries. It is not expected that there are many updates so let's keep it simple for

[PATCH v0 09/24] storage: Add void if function does not have any arguments

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- src/connman.h | 6 +++--- src/storage.c | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/connman.h b/src/connman.h index c70f6ae..d035336 100644 --- a/src/connman.h +++ b/src/connman.h @@ -209,10 +209,10 @@ int __connman_resolvfile_remove(c

[PATCH v0 10/24] config: Factor out config inotify handler

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- src/config.c | 97 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/src/config.c b/src/config.c index 4686914..16fed8d 100644 --- a/src/config.c +++ b/src/config.c @@ -562,6 +562,57 @@ static int

[PATCH v0 11/24] storage: Move generic inotify into storage.c

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- include/storage.h | 8 +++ src/config.c | 122 +- src/connman.h | 5 ++ src/main.c| 2 + src/storage.c | 155 ++ 5 files changed, 172 insertions(+), 120

[PATCH v0 12/24] gdbus: Add GetConnectionSELinuxSecurityContext

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- Makefile.am | 2 +- gdbus/gdbus.h | 9 +++ gdbus/selinux.c | 167 3 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 gdbus/selinux.c diff --git a/Makefile.am b/Makefile.am index 8693752

[PATCH v0 13/24] session: Add connman_session_get_owner()

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- include/session.h | 2 ++ src/session.c | 5 + 2 files changed, 7 insertions(+) diff --git a/include/session.h b/include/session.h index f178bb4..7bd8ce7 100644 --- a/include/session.h +++ b/include/session.h @@ -86,6 +86,8 @@ void connman_session_config_update(s

[PATCH v0 14/24] session_policy_ivi: Add policy plugin for IVI

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- Makefile.plugins | 12 +++ configure.ac | 6 plugins/session_policy_ivi.c | 75 3 files changed, 93 insertions(+) create mode 100644 plugins/session_policy_ivi.c diff --git a/Makefile.plu

[PATCH v0 15/24] session_policy_ivi: Add D-Bus connection

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index c11067e..2c30b05 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/session_policy_iv

[PATCH v0 16/24] session_policy_ivi: Get SELinux context of session owner

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 50 +++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 2c30b05..8a7503a 100644 --- a/plugins/session_policy_ivi.c +++ b

[PATCH v0 17/24] session_policy_ivi: Create session config

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner Instead using glib's cleanup hooks for the hash table, we implement it ourself. The reason for doing this is that we will use the policy_data structure via a second hash table. So there is no direct ownership between session_hash and policy_data after we add the second hash ta

[PATCH v0 18/24] session_policy_ivi: Factor out config creation

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 1218523..063e763 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/ses

[PATCH v0 19/24] session_policy_ivi: Read policy config from file system

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 116 +++ 1 file changed, 116 insertions(+) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 063e763..5e6b04b 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/sessi

[PATCH v0 20/24] session_policy_ivi: Watch for changes on policy files

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 54 1 file changed, 54 insertions(+) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 5e6b04b..9d3f457 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/sessio

[PATCH v0 21/24] session_policy_ivi: Factor out SELinux context parser

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 9d3f457..25be047 100644 --- a/plugins/session_policy_ivi.c +++ b/plugin

[PATCH v0 22/24] session_policy_ivi: Use the policy read from filesystem

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 25be047..c4e0e42 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/session_policy_i

[PATCH v0 23/24] session: Export session parsing functions

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- include/session.h | 4 +++ src/session.c | 76 +-- 2 files changed, 56 insertions(+), 24 deletions(-) diff --git a/include/session.h b/include/session.h index 7bd8ce7..8299205 100644 --- a/include/session.h +++ b/i

[PATCH v0 24/24] session_policy_ivi: Implement policy_load()

2012-10-01 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 94 +++- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index c4e0e42..d52b345 100644 --- a/plugins/session_policy_ivi.c +++

Re: [PATCH 0/4] Rfkilling technology fixes

2012-10-01 Thread Tomasz Bursztyka
Hi Jussi, Hi, While playing around with enabling/disabling technology I found out that if a technology is hardblocked through the physical switch, first the technology is still listed in GetTechnologies, but of course enabling it from dbus API will lead to nothing. User HAS to play with the ph

[PATCH] inet: Cleanup rtnl callback data properly

2012-10-01 Thread Jukka Rissanen
The inet_rtnl_cb_data struct allocated in __connman_inet_rtnl_talk() was not deallocated if we expected data from kernel. --- src/inet.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/inet.c b/src/inet.c index db6af38..ac45eb4 100644 --- a/src/inet.c +++ b/src/inet.

[PATCH] error: EINPROGRESS error was not handled

2012-10-01 Thread Jukka Rissanen
--- src/error.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/error.c b/src/error.c index c414469..f42b60e 100644 --- a/src/error.c +++ b/src/error.c @@ -62,6 +62,7 @@ DBusMessage *__connman_error_failed(DBusMessage *msg, int errnum) case ETIMEDOUT: return __conn

Re: [PATCH v2] wispr: Handle properly agent's provided error

2012-10-01 Thread Patrik Flykt
On Fri, 2012-09-28 at 15:41 +0300, Tomasz Bursztyka wrote: > --- > src/wispr.c | 14 -- > 1 file changed, 8 insertions(+), 6 deletions(-) Patch has been applied, thanks! Patrik ___ connman mailing list connman@connman.net http://l

Re: [PATCH] technology: Update tethering properties when relevant

2012-10-01 Thread Patrik Flykt
On Thu, 2012-09-20 at 16:33 +0300, Tomasz Bursztyka wrote: > --- > Hi, > > Currently when setting tethering related properties, it does not send a > PropertyChanged signal. > From a client point of view it's not nice: either you believe the SetProperty > return success or > after it you run a G

Re: [PATCH] test: Check test-connman arguments

2012-10-01 Thread Patrik Flykt
On Mon, 2012-10-01 at 11:22 +0300, patrik.fl...@linux.intel.com wrote: > From: Patrik Flykt > > Check test-connman offlinemode arguments and the number of arguments > in general. > > Fixes BMC#25723 Applied, Patrik ___ connman mailing list

Re: [PATCH 1/3] ntp: Calculate transmit time from receive time and monotonic delta

2012-10-01 Thread Patrik Flykt
On tis, 2012-09-25 at 13:28 +0300, patrik.fl...@linux.intel.com wrote: > From: Patrik Flykt > > Calculate transmit time used in NTP as the reception time minus > the delta of the monotonic receive and transmit times. When > calculated this way, it does not matter if the time happens to > be set t

Re: [PATCH] inet: Cleanup rtnl callback data properly

2012-10-01 Thread Patrik Flykt
On mån, 2012-10-01 at 13:15 +0300, Jukka Rissanen wrote: > The inet_rtnl_cb_data struct allocated in __connman_inet_rtnl_talk() > was not deallocated if we expected data from kernel. Applied, thanks! Patrik ___ connman mailing list connman@conn

Re: [PATCH] error: EINPROGRESS error was not handled

2012-10-01 Thread Patrik Flykt
On Mon, 2012-10-01 at 13:15 +0300, Jukka Rissanen wrote: > --- > src/error.c | 1 + > 1 file changed, 1 insertion(+) Applied, thanks. Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman

[PATCH] dnsproxy: Make sure channel is valid before accessing it

2012-10-01 Thread Jukka Rissanen
Fixes BMC#25726 --- src/dnsproxy.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 719c170..fd367a5 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1505,6 +1505,12 @@ static int ns_resolv(struct server_data *server, struct request_data *req,

Re: [PATCH 0/4] Rfkilling technology fixes

2012-10-01 Thread alok barsode
hi, On Mon, Oct 1, 2012 at 11:03 AM, Tomasz Bursztyka < tomasz.burszt...@linux.intel.com> wrote: > Hi Jussi, > > Hi, >>> >>> While playing around with enabling/disabling technology I found out that >>> if a technology is hardblocked through the physical switch, >>> first the technology is still

[PATCH 0/5 - v2] Rfkilling technology fixes

2012-10-01 Thread Tomasz Bursztyka
I refactored the previous patchset so it proposes first the hash table fix, and the proper hard rfkill handling (without DBus exposure change), as well as the rfkill cascading issue. Then the 2 last patches propose a fix for API 1.0: if a technology is hw rfkilled, it won't be exposed through

[PATCH 1/5] technology: Handle rfkill hash table in a saner way

2012-10-01 Thread Tomasz Bursztyka
--- src/technology.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/technology.c b/src/technology.c index d78e7b3..001208d 100644 --- a/src/technology.c +++ b/src/technology.c @@ -1288,7 +1288,7 @@ int __connman_technology_add_rfkill(unsigned int index,

[PATCH 2/5] technology: Handle rfkill hardblock relevantly

2012-10-01 Thread Tomasz Bursztyka
--- src/technology.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/technology.c b/src/technology.c index 001208d..f187a08 100644 --- a/src/technology.c +++ b/src/technology.c @@ -72,6 +72,8 @@ struct connman_technology { g

[PATCH 3/5] technology: Handle harblock if only all are identical for the same rfkill type

2012-10-01 Thread Tomasz Bursztyka
On some crappy hardware, there exist 2 rfkill entities for the same type, with cascading issue: if one is soft blocked, the other one is hardblocked. But if the hardblock switch is set, all are hardblocked. So this patch figures out that a technology is hardblock if only all related rkill event get

[PATCH 5/5] technology: Do not expose a technology which is hard rfkilled

2012-10-01 Thread Tomasz Bursztyka
If hard rfkilled, a technology will not be exposed through DBus via GetTechnologies. If hard rfkill status change, TechnologyAdded/TechnologyRemoved signals will be thrown accordingly. --- src/technology.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/technolo

[PATCH 4/5] technology: Add helpers for (un)registering a technology in dbus

2012-10-01 Thread Tomasz Bursztyka
--- src/technology.c | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/src/technology.c b/src/technology.c index ba47ee3..64cb5ce 100644 --- a/src/technology.c +++ b/src/technology.c @@ -74,6 +74,7 @@ struct connman_technology {

Re: [PATCH 0/4] Rfkilling technology fixes

2012-10-01 Thread Tomasz Bursztyka
Hi Alok, But you might not even have drivers for it, so it won't be possible to get > it enabled (my patches does not fix that issue anyway, there is an issue to > solve here) > And #3 because API 1.0 does not propose anything about that. > Cant we just return an different error for hard bloc

Re: [PATCH 0/4] Rfkilling technology fixes

2012-10-01 Thread alok barsode
hi Tomasz, On Mon, Oct 1, 2012 at 12:20 PM, Tomasz Bursztyka < tomasz.burszt...@linux.intel.com> wrote: > Hi Alok, > > But you might not even have drivers for it, so it won't be possible to get >>> > it enabled (my patches does not fix that issue anyway, there is an >>> issue to >>> > solve he

Re: [PATCH 2/5] technology: Handle rfkill hardblock relevantly

2012-10-01 Thread Patrik Flykt
Hi, On Mon, 2012-10-01 at 14:14 +0300, Tomasz Bursztyka wrote: > static GSList *driver_list = NULL; > @@ -962,6 +964,10 @@ static struct connman_technology > *technology_get(enum connman_service_type type) > > technology->refcount = 1; > > + technology->hardblocked = TR

Re: [PATCH 0/5 - v2] Rfkilling technology fixes

2012-10-01 Thread Patrik Flykt
On Mon, 2012-10-01 at 14:14 +0300, Tomasz Bursztyka wrote: > I refactored the previous patchset so it proposes first the hash table fix, > and the > proper hard rfkill handling (without DBus exposure change), as well as the > rfkill cascading > issue. Patches 1, 2 and 3 don't cause any controver

Re: [PATCH 0/5 - v2] Rfkilling technology fixes

2012-10-01 Thread Tomasz Bursztyka
Hi Patrik, Patches 1, 2 and 3 don't cause any controversy except for the minor nitpick. Maybe we should still add a patch that toggles WiFi off and removes all associated services. As it is now, it looks somewhat funny that all services still exist after toggling the hardblock switch. Yes that'

Re: [PATCH 0/4] Rfkilling technology fixes

2012-10-01 Thread Jussi Kukkonen
On Mon, Oct 1, 2012 at 1:03 PM, Tomasz Bursztyka wrote: >> I've not followed connman that closely recently, so it's entirely >> possible I'm missing something. Anyway, previous UX requirements in >> this area were: >>1. list the technologies that we have the hardware for >>2. allow enablin

Re: [PATCH 0/4] Rfkilling technology fixes

2012-10-01 Thread Tomasz Bursztyka
Hi Jussi, Consistency. Removing any evidence that the device is wifi-capable is just wrong. Not exposing the hw-block state to UI is wrong as well and now that you mention it, I think I've complained about it before:) True, you opened a bug long ago on BMC. Anyway wifi card has no driver, wifi

Re: [PATCH 0/4] Rfkilling technology fixes

2012-10-01 Thread Marcel Holtmann
Hi Tomasz, > > Consistency. Removing any evidence that the device is wifi-capable is > > just wrong. Not exposing the hw-block state to UI is wrong as well and > > now that you mention it, I think I've complained about it before:) > True, you opened a bug long ago on BMC. > > Anyway wifi card has