[PATCH 5/5] build: Replace GTHread library with pthread

2013-01-31 Thread Tomasz Bursztyka
--- Makefile.am | 16 +--- configure.ac | 8 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index c9abe0d..0a0029f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,7 +48,7 @@ src_pacrunner_SOURCES = $(gdbus_sources)

[PATCH v3 0/5] Handle threads data protection without obsolete g_thread API

2013-01-31 Thread Tomasz Bursztyka
Version 3: added the patch to fix configure.ac and Makefile.am Tomasz Bursztyka (5): proxy: Switch to pthread for mutex and condition handling client: Use pthread instead of obsolete g_thread API main: Remove obsolete g_thread_init() call unit: Remove obsolete g_thread_init() call build

[PATCH 1/5] proxy: Switch to pthread for mutex and condition handling

2013-01-31 Thread Tomasz Bursztyka
--- src/proxy.c | 56 +++- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/src/proxy.c b/src/proxy.c index 7c7f357..8e99f3b 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -24,6 +24,7 @@ #endif #include errno.h +#include

[PATCH] gresolv: Destroy query at the relevant place when parsing the response

2013-01-28 Thread Tomasz Bursztyka
parse_response() will eventually call sort_and_return_results() which in turn, will call the result function. But the result function might cancel the gresolv. At the point: all queries belonging to this gresolv are destroyed. Back to parse_response(), it calls again destroy_query() on an already

[PATCH] gresolv: Destroy query at the relevant place when parsing the response

2013-01-28 Thread Tomasz Bursztyka
parse_response() will eventually call sort_and_return_results() which in turn, will call the result function. But the result function might cancel the gresolv. At the point: all queries belonging to this gresolv are destroyed. Back to parse_response(), it calls again destroy_query() on an already

Re: [PATCH v2 09/14] technology: Enable/disable individual devices also with rfkill

2013-01-24 Thread Tomasz Bursztyka
Hi Patrik, This patch could be simpler for technology_enable() (you actually made it simple in techonolgy_disable): static int technology_enable(struct connman_technology *technology) { + int err, err_dev; + No need of err. DBG(technology %p enable, technology);

[PACrunner PATCH 0/3] Handle threads data protection without obsolete g_thread API

2013-01-22 Thread Tomasz Bursztyka
Hi, Here is an attempt to get ridd of g_thread API which became obsolete. Please review, Tomasz Bursztyka (3): proxy: Switch to pthread for mutex and condition handling main: Remove obsolete g_thread_init() call unit: Remove obsolete g_thread_init() call src/main.c| 3

[PACrunner PATCH 1/3] proxy: Switch to pthread for mutex and condition handling

2013-01-22 Thread Tomasz Bursztyka
--- src/proxy.c | 57 - 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/src/proxy.c b/src/proxy.c index 7c7f357..95e7fe7 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -24,6 +24,8 @@ #endif #include errno.h +#include

[PACrunner PATCH 3/3] unit: Remove obsolete g_thread_init() call

2013-01-22 Thread Tomasz Bursztyka
--- unit/test-pacrunner.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/unit/test-pacrunner.c b/unit/test-pacrunner.c index ec63940..f9d3c86 100644 --- a/unit/test-pacrunner.c +++ b/unit/test-pacrunner.c @@ -620,9 +620,6 @@ int main(int argc, char *argv[]) if (file_path != NULL)

[PACrunner PATCH 2/3] main: Remove obsolete g_thread_init() call

2013-01-22 Thread Tomasz Bursztyka
--- src/main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main.c b/src/main.c index 96b4881..edf61a3 100644 --- a/src/main.c +++ b/src/main.c @@ -154,9 +154,6 @@ int main(int argc, char *argv[]) DBusError err; guint signal; - if (g_thread_supported() ==

[PACrunner PATCH v2 0/4] Handle threads data protection without obsolete g_thread API

2013-01-22 Thread Tomasz Bursztyka
Hi, version 2 of the patchset. Added the patch for the client part. Please review, Tomasz Bursztyka (4): proxy: Switch to pthread for mutex and condition handling client: Use pthread instead of obsolete g_thread API main: Remove obsolete g_thread_init() call unit: Remove obsolete

[PACrunner PATCH v2 1/4] proxy: Switch to pthread for mutex and condition handling

2013-01-22 Thread Tomasz Bursztyka
--- src/proxy.c | 56 +++- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/src/proxy.c b/src/proxy.c index 7c7f357..8e99f3b 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -24,6 +24,7 @@ #endif #include errno.h +#include

[PACrunner PATCH v2 2/4] client: Use pthread instead of obsolete g_thread API

2013-01-22 Thread Tomasz Bursztyka
--- src/client.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client.c b/src/client.c index c41a738..1919146 100644 --- a/src/client.c +++ b/src/client.c @@ -24,13 +24,14 @@ #endif #include gdbus.h +#include pthread.h #include pacrunner.h struct

[PATCH] service: Notify leaving online state when downgrading it to ready

2013-01-21 Thread Tomasz Bursztyka
Fixes BMC#25862 --- src/service.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index dfa56b7..1e7cec7 100644 --- a/src/service.c +++ b/src/service.c @@ -3869,8 +3869,10 @@ static void apply_relevant_default_downgrade(struct connman_service

[PATCH v2 0/2] Do not report any error when removing a connecting network

2013-01-16 Thread Tomasz Bursztyka
Hi, Same patch as before but splitted. Tomasz Bursztyka (2): network: Move up code about set_connected() and set_disconnected network: Do not report any error when removing a connecting network src/network.c | 1255 + 1 file changed

[PATCH v2 1/2] network: Move up code about set_connected() and set_disconnected

2013-01-16 Thread Tomasz Bursztyka
Useful for next patch --- src/network.c | 1252 + 1 file changed, 627 insertions(+), 625 deletions(-) diff --git a/src/network.c b/src/network.c index 0e64c35..ac4608b 100644 --- a/src/network.c +++ b/src/network.c @@ -122,6 +122,633 @@

[PATCH v2 2/2] network: Do not report any error when removing a connecting network

2013-01-16 Thread Tomasz Bursztyka
When connecting a network, if it's related technology is disabled, this network will raise an error through the agent. Leading to a possible retry request from the user, then to a crash if the user does so. Thus, we prevent any error to be raised in such situation and silently disconnect the

[PATCH] agent: Keep track of the driver to unref user context relevantly

2013-01-15 Thread Tomasz Bursztyka
Fixes BMC#25884 --- src/agent.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/agent.c b/src/agent.c index 3be4b61..5c3bd28 100644 --- a/src/agent.c +++ b/src/agent.c @@ -187,9 +187,10 @@ int connman_agent_queue_message(void *user_context, driver =

Re: [PATCH] service: Update notifier state when relevant while getting ready

2013-01-15 Thread Tomasz Bursztyka
Hi Patrik, Applied, thanks! Was there a BMC bug number for this one also? Afaik, no. Tomasz ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman

[PATCH] gweb: Make sure to destroy the lookup before calling any result function

2013-01-11 Thread Tomasz Bursztyka
Program received signal SIGSEGV, Segmentation fault. Backtrace: 0 0x004219fe in _debug (resolv=0x75f9a0, file=0x497267 gweb/gresolv.c, caller=0x497598 destroy_lookup, format=0x497278 lookup %p id %d ipv4 %p ipv6 %p) at gweb/gresolv.c:136 1 0x00421ac5 in destroy_lookup

Re: [RELEASE] connman-ui is out

2013-01-03 Thread Tomasz Bursztyka
Hi Daniel, I'll tried to fix this here: src/gtktechnology.c: In function ‘gtk_technology_get_type’: src/gtktechnology.c:42:809: warning: statement with no effect [-Wunused-value] src/gtkservice.c: In function ‘gtk_service_get_type’: src/gtkservice.c:44:764: warning: statement with no effect

Re: [RELEASE] connman-ui is out

2013-01-03 Thread Tomasz Bursztyka
Hi Carsten, Indeed your distro enables all possible supports in gtk3 but wayland. That's a bit too much. Depending on available time and required effort I will take a look at gtk2. Tomasz ___ connman mailing list connman@connman.net

Re: [RELEASE] connman-ui is out

2013-01-02 Thread Tomasz Bursztyka
Hi Carsten, This looks interesting Tomasz. Does it really require Gtk+ 3.x or can it also be built with Gtk+ 2.x? I've been avoiding Gtk+ 3.x due to the various new dependencies (libs and daemons) it pulls in in most distro packages configurations. Also I haven't yet ported my Gtk+ 2.x

[PATCH] test: Fix broken simple-agent so it registers the right path

2013-01-02 Thread Tomasz Bursztyka
--- test/simple-agent | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/simple-agent b/test/simple-agent index ebb44c5..2487b7b 100755 --- a/test/simple-agent +++ b/test/simple-agent @@ -309,8 +309,8 @@ if __name__ == '__main__': vpn_manager =

[RELEASE] connman-ui is out

2012-12-31 Thread Tomasz Bursztyka
Hi, I just published the source of connman-ui in github. The repository can be found here: https://github.com/tbursztyka/connman-ui As a description, I copy/paste here parts of the README file: Connman-ui is a full-featured GTK based trayicon UI for ConnMan. It targets all WM/DM users but

Re: connman does not configure ethernet

2012-11-02 Thread Tomasz Bursztyka
Hi Tim, I missatached the file. Somehow i had an old connman patch lying in the same directory and attached the wrong file. (Unfortunatly it was a patch which caused enought confusion already... if i would be beliving i would say this thing is cursed;-). Ok that explains it, looked really

[PATCH] technology: Do not proceed with tethering if technology is not enabled

2012-10-26 Thread Tomasz Bursztyka
Fixes BMC#25846 --- src/technology.c | 4 1 file changed, 4 insertions(+) diff --git a/src/technology.c b/src/technology.c index 324a103..1ff8fb7 100644 --- a/src/technology.c +++ b/src/technology.c @@ -223,6 +223,10 @@ static int set_tethering(struct connman_technology *technology,

[PATCH] technology: Do not presume hardblocked state at first place

2012-10-25 Thread Tomasz Bursztyka
This fixes on issue on signal TechnologyAdded when first time un-hardblock occures: - technologies when created gets dbus registered as they are not yet set as rfkill driven, even if hardblocked is presumed to be TRUE - technologies get updated as rfkill driven, but since hardblocked is

[PacRunner - PATCH] build: Fix configure script so plugindir is well set without --prefix

2012-10-24 Thread Tomasz Bursztyka
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2cc217b..2bfbd73 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ AM_MAINTAINER_MODE AC_PREFIX_DEFAULT(/usr/local) -if (test ${libdir} =

[PacRunner - Patch 0/4] Apply latest changes to gdbus in PacRunner

2012-10-24 Thread Tomasz Bursztyka
Hi, This 4 patches are missing in PacRunner's gdbus. Please apply, Johan Hedberg (1): gdbus: Fix crash when getting disconnected from the bus Lucas De Marchi (2): gdbus: Fix wrong signal handler match gdbus: Refactor filter_data_find() Luiz Augusto von Dentz (1): gdbus: Fix not

[PacRunner - Patch 1/4] gdbus: Fix crash when getting disconnected from the bus

2012-10-24 Thread Tomasz Bursztyka
From: Johan Hedberg johan.hedb...@intel.com When getting disconnected from the bus sometimes (maybe always?) dbus_watch_handle() can cause the info context to be free'd meaning that we should not try to access it after the call. The only member we need access to is the connection pointer and as

[PacRunner - Patch 2/4] gdbus: Fix wrong signal handler match

2012-10-24 Thread Tomasz Bursztyka
From: Lucas De Marchi lucas.demar...@profusion.mobi When we add a signal handler with g_dbus_add_signal_watch(), this function tries to multiplex the matches added in libdbus by checking if there's a previous filter_data with the same fields. However, if the field is NULL it accepts as being the

[PacRunner - Patch 3/4] gdbus: Refactor filter_data_find()

2012-10-24 Thread Tomasz Bursztyka
From: Lucas De Marchi lucas.demar...@profusion.mobi Now this function is only used for searching the listeners of a connection and the other parameters are not needed anymore. --- gdbus/watch.c | 43 +-- 1 file changed, 5 insertions(+), 38 deletions(-)

[PacRunner - Patch 4/4] gdbus: Fix not freeing list node by using g_slist_delete_link

2012-10-24 Thread Tomasz Bursztyka
From: Luiz Augusto von Dentz luiz.von.de...@intel.com g_slist_remove_link does not free the node which can cause leaks so replace that with g_slist_delete_link which does free memory properly. --- gdbus/watch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbus/watch.c

Re: Understanding connection flow in connman

2012-10-23 Thread Tomasz Bursztyka
Hi, Which version of connman? indicator-network is pretty old, and probably not compatible with version 1.x of connman. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman

[PATCH] wispr: Free wispr portal context in the relevant place

2012-10-23 Thread Tomasz Bursztyka
This fixes 2 issues: - calling __connman_service_ipconfig_indicate_state() might lead to restart wispr_portal check, so context should not be freed afterward but before hand. - freeing the context in wispr_manage_message() should not happen since wispr_manage_message() will return back to

Re: Understanding connection flow in connman

2012-10-23 Thread Tomasz Bursztyka
Hi I was using connman v1.3. Maybe I should take a look at the more recent version. This will not work with cmcc/indicator-network. Will take a look at them and see if I can figure things out. Are there, by any chance, other application front-ends that use connman for connection management

[PATCH] device: Do no mark as unavailable a connecting network

2012-10-22 Thread Tomasz Bursztyka
Fixes the bug reported by Arron Wang: plugins/wifi.c:interface_state() wifi 0xa1e48 interface state 6 plugins/wifi.c:reset_autoscan() src/device.c:connman_device_unref_debug() 0x9b258 ref 3 by plugins/wifi.c:231:reset_autoscan() src/device.c:connman_device_set_scanning() device 0x9b258 scanning

Re: [PATCH] device: Do no mark as unavailable a connecting network

2012-10-22 Thread Tomasz Bursztyka
: this removes all network marked as unavailable. can you put that in the commit message before the log? In the log you can see that once you know that :) Hi, On Mon, 2012-10-22 at 10:07 +0300, Tomasz Bursztyka wrote: Fixes the bug reported by Arron Wang: plugins/wifi.c:interface_state() wifi

Re: [PATCH] wifi: Don't set scanning to FALSE during connecting

2012-10-21 Thread Tomasz Bursztyka
Hi Arron, I think we'd better to set scanning to FALSE by the scan call back function, other place is not suitable beside we disable wifi. Set scanning to FALSE will do following operations: cleanup_networksduring scanning all networks will be removed

Re: [PATCH] wifi: Don't set scanning to FALSE during connecting

2012-10-19 Thread Tomasz Bursztyka
Hi Arron, Ok I see, but actually your patch is wrong because if autoscan fallback has started, it put scanning to true, and at those place you really need to put scanning to false. Instead, you might try a patch on src/device.c in function mark_network_unavailable(): change line: if

Re: [PATCH] wifi: Don't set scanning to FALSE during connecting

2012-10-18 Thread Tomasz Bursztyka
Hi Arron, Do you have any logs about that? This has been here for quite long time and afaik, nothing like that has been reported. setting scanning to false removes only unavailable network, so the ones which has not been found during scanning (set scanning to true puts all network

[PATCH 0/4] Minor client improvements

2012-10-17 Thread Tomasz Bursztyka
A quick patch set before seding agent support: trivial memory leaks fixes and added support for Remove() method on service (which changes Favorit to False) Tomasz Bursztyka (4): client: Fix some memory leaks in commands part client: Fix some memory leaks in data_manager part client: Fix

[PATCH 1/4] client: Fix some memory leaks in commands part

2012-10-17 Thread Tomasz Bursztyka
--- client/commands.c | 159 +++--- 1 file changed, 78 insertions(+), 81 deletions(-) diff --git a/client/commands.c b/client/commands.c index 22d5b3c..73a92eb 100644 --- a/client/commands.c +++ b/client/commands.c @@ -102,35 +102,43 @@ int

[PATCH 2/4] client: Fix some memory leaks in data_manager part

2012-10-17 Thread Tomasz Bursztyka
--- client/data_manager.c | 58 +++ 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/client/data_manager.c b/client/data_manager.c index 723b979..13994c8 100644 --- a/client/data_manager.c +++ b/client/data_manager.c @@ -90,26 +90,31

[PATCH 3/4] client: Fix various memory leaks in monitor and services parts

2012-10-17 Thread Tomasz Bursztyka
--- client/monitor.c | 5 + client/services.c | 10 -- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/client/monitor.c b/client/monitor.c index 3c3ca5c..d2f8846 100644 --- a/client/monitor.c +++ b/client/monitor.c @@ -164,6 +164,9 @@ DBusHandlerResult

[PATCH 4/4] client: Add Remove() method support for service

2012-10-17 Thread Tomasz Bursztyka
--- client/commands.c | 5 + client/services.c | 31 +++ client/services.h | 2 ++ 3 files changed, 38 insertions(+) diff --git a/client/commands.c b/client/commands.c index 73a92eb..4cc3b2d 100644 --- a/client/commands.c +++ b/client/commands.c @@ -88,6 +88,7

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

2012-10-15 Thread Tomasz Bursztyka
Hi, Here is a 3rd version. Almost same as before: Fixed patch 2 so it checks hardblocked status if only rfkill_driven is true. Tested by Alok against cellular, which was not rfkill driven, and it works. Tomasz Bursztyka (11): technology: Refactor how technology is set to enable or disable

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

2012-10-15 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 - v3 02/11] technology: Add a marker to know if a technology is rfkill driven

2012-10-15 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 | 13 ++--- 1 file changed, 10

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

2012-10-15 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 11bf0c0..16324c9 100644 --- a/src/technology.c +++ b/src/technology.c @@ -74,6 +74,7 @@ struct connman_technology { GSList *scan_pending;

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

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

2012-10-15 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 8c736ea..345dcab 100644 --- a/src/technology.c +++ b/src/technology.c @@ -1200,41 +1200,37 @@ static void

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

2012-10-15 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 345dcab..d2c074e 100644 --- a/src/technology.c +++ b/src/technology.c @@ -55,7 +55,7 @@ struct connman_technology {

[PATCH - v3 07/11] technology: Use the right method to enable or disable

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

[PATCH - v3 08/11] device: Add a getter for powered property

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

[PATCH - v3 09/11] technology: Handle fully and properly rfkill driven state

2012-10-15 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 4ae5b86..44eeb13 100644 --- a/src/technology.c +++ b/src/technology.c @@ -1198,6 +1198,9 @@ int

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

2012-10-15 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 - v3 11/11] technology: Fix hardblocked state on non hw rfkillable switch added

2012-10-15 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. --- src/technology.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff

[PATCH - v2 0/2] Interface readiness, scan and device refcount issue

2012-10-15 Thread Tomasz Bursztyka
plugin: scan_callback() is never called so it does not unref the device. --- Tomasz Bursztyka (2): gsupplicant: Interpret unreadiness as an error on scan result wifi: Do not start autoscan if interface cannot do anything gsupplicant/supplicant.c | 10 +- plugins/wifi.c

[PATCH - v2 2/2] wifi: Do not start autoscan if interface cannot do anything

2012-10-15 Thread Tomasz Bursztyka
--- plugins/wifi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index 2984de0..631d0cc 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -516,7 +516,10 @@ static void scan_callback(int result, GSupplicantInterface *interface,

[PATCH - v2 1/2] gsupplicant: Interpret unreadiness as an error on scan result

2012-10-15 Thread Tomasz Bursztyka
--- gsupplicant/supplicant.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 477106b..cd1225e 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -2700,12 +2700,20 @@ static void

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

2012-10-11 Thread Tomasz Bursztyka
switch says it's not hardblocked: the technology is not hardblocked. Anyway, have been testing it for some days now, seems to work properly. Please review, Tomasz Bursztyka (11): technology: Refactor how technology is set to enable or disable technology: Add a marker to know if a technology

[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] gsupplicant: Adding a new state according to 'interface_disabled'

2012-10-10 Thread Tomasz Bursztyka
When soft rfkill is on, wpa_supplicant sets the interface disabled, and send a state named 'interface_disabled'. It is required to be managed and taken into account to set if interface is ready or not. It fixes this issue: - disable wifi (user setting), and hard rfkill it. - then un-hard rfkill

[PATCH v2] gsupplicant: Adding a new state according to 'interface_disabled'

2012-10-10 Thread Tomasz Bursztyka
When soft rfkill is on, wpa_supplicant sets the interface disabled, and send a state named 'interface_disabled'. It is required to be managed and taken into account to set interface ready or not. It fixes this issue: - disable wifi (user setting), and hard rfkill it. - then un-hard rfkill it:

[PATCH 0/2] Interface readiness, scan and device refcount issue

2012-10-10 Thread Tomasz Bursztyka
. This did not mess up the usual scanning functionnality that I tested so far. First patch is the actual fix. Second patch is avoiding starting autoscan fallback if the interface is not ready. Please review, Tomasz Bursztyka (2): gsupplicant: Interpret unreadiness as an error on scan result wifi

[PATCH 1/2] gsupplicant: Interpret unreadiness as an error on scan result

2012-10-10 Thread Tomasz Bursztyka
--- gsupplicant/supplicant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 477106b..576df20 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -2701,8 +2701,8 @@ static void

[PATCH 2/2] wifi: Do not start autoscan if interface is not ready on scan callback

2012-10-10 Thread Tomasz Bursztyka
--- plugins/wifi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index 2984de0..aecf980 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -516,7 +516,10 @@ static void scan_callback(int result, GSupplicantInterface *interface,

[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

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

2012-10-09 Thread Tomasz Bursztyka
. Though I would not be surprised that crappy hw/drivers might create corner issues but that has to be verified. Please review, Tomasz Bursztyka (10): technology: Refactor how technology is set to enable or disable technology: Add a marker to know if a technology is rfkill driven technology: Add

[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

[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

[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

[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

[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

[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)

[PATCH v3] gdbus: Fix crash error when calling g_dbus_remove_all_watches

2012-10-04 Thread Tomasz Bursztyka
--- Hi, While using gdbus on some other code, I found out that bug around g_dbus_remove_all_watches() usage. I guess it should be fixed in all projects using gdbus. It could be fixed also via removing g_free(cb); in the previous for() loop instead, but I preferred not, since it would then

[PATCH] conf: Allow .Counter/.Notification interface in connman-polkit.conf

2012-10-03 Thread Tomasz Bursztyka
--- I noticed that, if build with polkit support, the dbus conf file does not allow .Counter/.Notification interfaces, so session stuff is broken (connman sends notification but they are rejected) src/connman-polkit.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 6/8 - v3] technology: Do not apply Powered setting change if hardblock is on

2012-10-03 Thread Tomasz Bursztyka
--- Let's return a relevant error instead src/technology.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/technology.c b/src/technology.c index 502cd60..e94e3b9 100644 --- a/src/technology.c +++ b/src/technology.c @@ -650,7 +650,12 @@ static DBusMessage

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

2012-10-02 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 3/8] technology: Handle harblock if only all are identical for the same rfkill type

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

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

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

[PATCH 4/8] technology: Link hard rfkill with actual device's state

2012-10-02 Thread Tomasz Bursztyka
When hardblocking a technology, it should disable the devices which belongs to that technology. When un-hardblocking it should do the same but taking care about user setting (it will enable the devices if only enable_persistent is on). --- src/technology.c | 26 ++ 1 file

[PATCH 5/8] technology: Simplify set_powered function

2012-10-02 Thread Tomasz Bursztyka
--- src/technology.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/technology.c b/src/technology.c index 24949f2..502cd60 100644 --- a/src/technology.c +++ b/src/technology.c @@ -650,19 +650,15 @@ static DBusMessage *set_powered(struct connman_technology

[PATCH 6/8] technology: Do not apply Powered setting change if hardblock is on

2012-10-02 Thread Tomasz Bursztyka
--- src/technology.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/technology.c b/src/technology.c index 502cd60..f8443dd 100644 --- a/src/technology.c +++ b/src/technology.c @@ -650,7 +650,10 @@ static DBusMessage *set_powered(struct connman_technology

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

2012-10-02 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 | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

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

[PATCH 0/5 - v2] Rfkilling technology fixes

2012-10-01 Thread Tomasz Bursztyka
DBus. Tomasz Bursztyka (5): technology: Handle rfkill hash table in a saner way technology: Handle rfkill hardblock relevantly technology: Handle harblock if only all are identical for the same rfkill type technology: Add helpers for (un)registering a technology in dbus technology

<    3   4   5   6   7   8   9   10   11   12   >