aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-06-13Release 0.19HEAD0.19masterMarcel Holtmann2-1/+4
2022-06-13build: Fix usage of AC_OUTPUTMarcel Holtmann1-1/+3
2022-06-13build: Update to support Libtool >= 2.2Marcel Holtmann1-5/+2
2022-06-13build: Update to support Autoconf >= 2.69Marcel Holtmann1-14/+14
2022-06-13duktape: Import v2.7.0Marcel Holtmann3-10251/+11703
2020-12-07Release 0.180.18Marcel Holtmann2-1/+4
2020-12-07build: Remove AC_PROG_CXX checkMarcel Holtmann1-1/+0
2020-12-07duktape: Import v2.6.0Marcel Holtmann3-276/+426
2019-11-27Release 0.170.17Marcel Holtmann2-1/+4
2019-11-27duktape: Import v2.5.0Marcel Holtmann3-1315/+3386
2019-08-02Release 0.160.16Marcel Holtmann2-1/+6
2019-08-02plugins: Remove support for MozJS engineMarcel Holtmann7-519/+1
2019-08-02plugins: Remove support for V8 engineMarcel Holtmann3-294/+0
2019-08-02duktape: Import v2.4.0Marcel Holtmann3-7400/+8431
2019-08-02js: Fix issue with size truncation and __builtin_strncpyMarcel Holtmann1-1/+1
2018-09-26Release 0.150.15Marcel Holtmann2-1/+4
2018-09-26duktape: Import v2.3.0Marcel Holtmann3-2260/+3979
2018-06-08Release 0.140.14Marcel Holtmann2-1/+4
2018-06-08duktape: Import v2.2.1Marcel Holtmann3-133/+157
2017-11-06Release 0.130.13Marcel Holtmann2-1/+4
2017-11-06build: Remove unneeded -Wno-format-truncation and -Wimplicit-fallthrough=2Marcel Holtmann3-20/+0
2017-11-06duktape: Import v2.2.0Marcel Holtmann3-12458/+14314
2017-08-30Release 0.120.12Marcel Holtmann2-1/+5
2017-08-30build: Handle missing support for -Wimplicit-fallthrough=2Marcel Holtmann3-2/+20
2017-08-30build: The -Wno-unused-function is no longer needed with Duktape 2.1.1Marcel Holtmann1-2/+1
2017-08-30duktape: Import v2.1.1Marcel Holtmann3-33/+72
2017-07-22build: Exclude org.pacrunner.service fileMarcel Holtmann1-1/+1
2017-07-22build: Use no-format-truncation and implicit-fallthrough=2 for duktapeMarcel Holtmann1-1/+3
2017-07-21dbus: Rename D-Bus autostart service file nameJulien Massot3-2/+2
The autostart file needs to match the service name according the D-Bus specification [1]: """ The service filename of "org.me.test.service" is then searched for in /usr/share/dbus-1/system-services or other specified directories. """ This fixes "Bus name not found in system service directory". [1] https://dbus.freedesktop.org/doc/system-activation.txt
2017-04-27build: Add --enable-duktape to distcheck optionsMarcel Holtmann1-1/+1
2017-04-27Release 0.110.11Marcel Holtmann2-1/+6
2017-04-26duktape: Import v2.1.0Daniel Wagner3-24783/+31328
2017-04-26build: Remove --enable-mozjs from distcheck optionsMarcel Holtmann1-1/+1
2017-04-26AUTHORS: Mention Jeremy's contributionsDaniel Wagner1-0/+1
2017-04-26build: Pull pacrunner forward to mozjs38Jeremy Linton3-60/+68
Mozjs185 is getting really old and unsupported. Newer versions of the mozjs JSAPI are C++ based. So we convert the plugin to C++ and then apply necessarily API changes so that it can be built with the more recent mozjs38. For example we now need to "root" values being passed into the API in order to satisfy the JSAPI garbage collection rules. Further, a number of the APIs have been tweaked and moved into the JS namespace, so we namespace them appropriately and adjust their parameters.
2017-04-24proxy: Fix unclean shutdown with proxy_disableJeremy Linton1-1/+2
The proxy disable code calls set_proxy and clears the context structure, which results in the mosjs_clear_proxy not being called. Also there is a memory leak in the glist due to use of remove_link() rather than remove(). The former simply removes the entry from the linked list but doesn't free it.
2017-04-24unit: Fix test-mozjs memory leakJeremy Linton1-7/+12
The mozjs execute calls returns a g_strdup'ed result. This means that the unit test needs to free the resulting data.
2016-10-05Release 0.100.10Marcel Holtmann2-1/+8
2016-10-05build: Include *.a files for .gitignoreMarcel Holtmann1-0/+1
2016-10-05AUTHORS: Mention Atul's contributionsPatrik Flykt1-0/+1
2016-10-05unit: Add tests for BrowserOnly KeyAtul Anand7-19/+80
test-pacrunner and suites have been fixed to test BrowserOnly key and it's function.
2016-10-05src/proxy.c: modify the proxy_lookup () supporting non-browser schemesAtul Anand4-29/+111
As discussed, the proxy lookup for browser and non browser schemes should be handled in an order as follows: A request for a "browser" protocol would match the following configs order of preference (if they exist): • Matching "Domains", BrowserOnly==TRUE • Matching "Domains", BrowserOnly==FALSE • Domains==NULL, BrowserOnly==TRUE • Domains==NULL, BrowserOnly==FALSE A request for a non-browser protocol would match the following: • Matching "Domains", BrowserOnly==FALSE • Domains==NULL, BrowserOnly==FALSE (except if a config exists with Matching "Domains", BrowserOnly==TRUE, in which case we need to return NULL). Update test cases to use pacrunner_proxy_set_domains() with three arguments.
2016-10-05docs: update manager-api.txt to include BrowserOnly KeyAtul Anand1-0/+6
It has been documented that we are adding a new dict key BrowserOnly on PACrunner DBus interface.
2016-08-19build: Only link -lcunit for unit tests itselfMarcel Holtmann2-14/+11
2016-08-19build: Remove libstdc++ from non-V8 buildsDavid Woodhouse1-9/+16
Autohell will automatically use g++ for the final link if it sees any C++ sources, even if it isn't actually building them today. So... link plugins/v8.cc into its own intermediate library, so there *aren't* any C++ sources for src/pacrunner and it doesn't do that. Add -fno-exceptions to AM_CXXFLAGS, so that it doesn't actually *need* to link against libstdc++, even when V8 support is being built. Add -lm to the relevant LDADD variables when duktape is being built, because it needs trunc() from libm and was magically getting it before.
2016-08-19build: Use -Wno-unused-function for libduktapeMarcel Holtmann1-5/+14
2016-08-19v8: Set plugin priority to low because of missing instance supportMarcel Holtmann1-4/+4
2016-08-19build: Enable duktape plugin by defaultMarcel Holtmann1-0/+1
2016-08-19Add duktape supportDavid Woodhouse3-1/+248
2016-08-19Import duktape v1.5.0David Woodhouse3-0/+91699
2016-08-19js: add __pacrunner_js_resolve() functionDavid Woodhouse4-62/+40
Remove the duplicate definitions from mozjs and v8 plugins
2016-08-19js: add __pacrunner_js_getipaddr() functionDavid Woodhouse4-69/+48
Remove the duplicate definitions from mozjs and v8 plugins
2016-08-19mozjs: Rename 'ctx' argument to dnsresolve() to 'jsctx'David Woodhouse1-6/+6
...for reasons which will become apparent shortly.
2016-08-19plugins: New shared C file for common JavaScript routinesDavid Woodhouse5-12/+39
2016-08-19mozjs: Fix error handling for wrongly-formatted hostnameDavid Woodhouse1-2/+2
In commit d9ea7b8a ("plugins: Do not try to resolve a wrongly formated hostname") we introduced a check on the string before we attempt to resolve it. In the mozjs case we simply return a NULL result instead of raising an exception when this function fails... except that the new sanity check was placed before the JS_SET_RVAL() call, and no return value was set at all. Move it to the right place.
2016-07-14gdbus/client: Use g_dbus_send_message if callback is not setLuiz Augusto von Dentz1-12/+14
If the user don't set a function it means it doesn't care about the reply so g_dbus_send_message can be used.
2016-07-14gdbus/client: Always call ready callbackLuiz Augusto von Dentz1-3/+3
Call ready callback regardless of the reply to GetManagedObjects since otherwise the user code will be left waiting forever when in fact no proxy will be created.
2016-06-23proxy: Add debugging on proxy selectionDavid Woodhouse1-1/+11
2016-06-23mozjs: Fix global variable storageDavid Woodhouse1-53/+68
Support a JS context per proxy configuration, instead of only one at a time.
2016-06-23proxy: Add pacrunner_js_clear_proxy()David Woodhouse5-0/+21
We'll want this for a sane per-proxy-config cleanup of the JS context.
2016-06-23proxy: Add get/set methods for new jsctx pointerDavid Woodhouse2-0/+14
If we want the JS backends to be able to store context per proxy config, then we need to give them somewhere to put it...
2016-06-23js: Add proxy argument to JS execute() methods.David Woodhouse7-16/+31
For now, just make the back ends automatically switch over, if they're being invoked on a different context to the last invocation. We'll fix them shortly to support multiple contexts.
2016-06-23proxy: Fix handling of proxy->domainsDavid Woodhouse1-5/+7
In create_proxy_config() we were calling pacrunner_proxy_set_domains(), which was returning an error if passed a NULL list of domains. Then we were calling pacrunner_proxy_set_auto() or one of its friends, which all call reset_proxy() and *delete* the list of domains, if one was set. Treat proxy->domains like proxy->interface, and don't reset it in reset_proxy(). And fix up pacrunner_proxy_set_domains() so that it happily accepts a NULL domains list and behaves appropriately. As a side-effect, this stops pacrunner_proxy_set_domains() from being additive — if you call it a second time it'll clear the original set and set just the ones you've just passed, instead of adding new domains to the list. Which is a much saner semantic.
2016-06-16unit: new test proxy_domain added.Atul Anand7-4/+130
A new test proxy_domain.test has been added which tests all conditions to see whether Pacrunner answer correctly using Domains.
2016-06-16src: Domains are looked up to match the host.Atul Anand3-12/+211
Pacrunner now scan stored domains to match the host of URL. In this way the most appropriate proxy config is selected to answer the proxy query.
2016-06-16doc: Updated to point out the usage of Domains.Atul Anand1-1/+4
manager-api.txt has been edited to highlight the proper usage of Domains key which explains that IP ranges can also be added to it in CIDR form.
2015-12-29gdbus: Move typedefs for interwork with strict compilersGrant Erickson1-6/+6
Move enumeration type defintions AFTER the enumerations themselves are declared and defined such that the header works with strict compilers. This occurs when building a plugin, compiled with C++, and occurs on all of: arm-none-linux-gnueabi-g++ (Sourcery G++ Lite 2010q1-202) 4.4.1 arm-poky-linux-gnueabi-g++ (GCC) 4.8.2 g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
2015-12-29gdbus: Fix Memory LeakSaurav Babu1-25/+25
Members of data are allocated memory but not freed only data is freed
2015-12-29gdbus: Drop message replies if the sender requested no replyPhilip Withnall1-1/+2
If the sender flags a D-Bus message as not expecting a reply, it is against system bus policy to send a reply — sending one will result in errors being sent to us by dbus-daemon. Magically drop all replies to messages which request no reply. ofonod is one process which sends BlueZ messages which request no reply, when it is setting up a hands-free agent. This is not a complete fix. In an ideal world, the existing check for G_DBUS_METHOD_FLAG_NOREPLY would be dropped, as the server should be prepared to return a reply to every method, if the client requests and expects one — otherwise the client will time out. However, that’s a much bigger change with a much bigger risk of breaking things, so I’ll stick with this for now.
2015-12-29gdbus: Remove unnecessary empty lineJohan Hedberg1-1/+0
2015-12-29gdbus: add method for immediate property updateJakub Pawlowski2-3/+23
g_dbus_emit_property_changed doesn't send dbus signal immediately. Instead it stores changed properties, and schedule signal to be send at g_iddle_add. Additionally, if this method is called few times for some property, only last value will be sent in property changed signal. If remote device sends lots of notifications, they're all scheduled to be notified using this method. This might result in some notifications being lost. This patch adds new method, that can immediately send property changed signal, instead of sheduling it for nearest iddle moment.
2015-04-20gdbus: Close private connection if setup failsLuiz Augusto von Dentz1-0/+1
Private connection should be properly closed with dbus_connection_close otherwise libdbus exits with the following error: 'The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details. Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.'
2015-04-09gdbus: Fix crash in g_dbus_create_error_valistSzymon Janc1-1/+4
Passing NULL format parameter to vsnprintf results in invalid argument error on glibc. But with some other libc libraries (musl and uClibc) this results in dereferencing NULL pointer and crash due to segmentation fault.
2015-04-09gdbus: Use g_dbus_create_error_valist internallySzymon Janc1-4/+1
There is no need to duplicate code in g_dbus_send_error_valist.
2015-04-07gdbus: Add g_dbus_get_flags functionMichael Janssen2-0/+6
The g_dbus_get_flags function enables detection of when the G_DBUS_FLAG_ENABLE_EXPERIMENTAL is set.
2015-03-26gdbus: Make GDBusClient work without ObjectManagerLuiz Augusto von Dentz1-2/+7
This makes GDBusClient work normally without ObjectManager.
2015-03-26gdbus/client: Allow specifying ObjectManager pathArman Uguray2-6/+22
GDBusClient currently hard-codes "/" as the remote ObjectManager path. This is generally incorrect, as an application can choose to expose an ObjectManager at any well-known path. This patch fixes this by allowing the user to pass in the ObjectManager path by introducing a new conctructor "g_dbus_client_new_full".
2015-03-26gdbus/client: Don't GetManagedObjects w/o handlersArman Uguray1-1/+2
The client code currently issues GetManagedObjects if new handlers are set via g_dbus_client_set_proxy_handlers. An application may set these to NULL before unref'ing a client or to simply prevent further events. Hence, there is no need to refresh objects or properties if all handlers are NULL.
2015-02-24gdbus: Fix not calling disconnect functionSzymon Janc1-3/+4
If daemon gets disconnected from D-Bus sender is NULL. Watches that was explicitly added with NULL sender (ie disconnected_signal in g_dbus_set_disconnect_function) should be called anyway.
2015-02-22unit: Use memmove instead of g_memmoveMarcel Holtmann1-1/+1
2015-02-22gdbus: Don't refresh objects/props if disconnectedArman Uguray1-5/+8
If g_dbus_client_set_proxy_handlers gets called from within a proxy_removed callback, the code may end up refreshing the proxy's properties and incorrectly access the client's proxy_list as it gets freed. This patch fixes this, so that get_managed_objects does nothing if it gets called during a service disconnect.
2014-09-15gdbus: Fix match rule for NameOwnerChangedAlban Crequy1-1/+2
When subscribing to the D-Bus signal NameOwnerChanged from the bus driver, specify the object path and the sender in the match rule. Otherwise, random connections on the bus could impersonate the bus driver.
2014-09-15Release 0.90.9Marcel Holtmann2-1/+5
2014-09-08gdbus: Fix crash when watch is toggled or disconnectedLuiz Augusto von Dentz1-2/+8
This partially reverts 510b32b7156625b9df737c916b7a7a5c6fb285b9 since it still necessary to take a reference before calling dbus_watch_handle since internally it can call watch_info_free as in the following trace: Invalid read of size 8 at 0x121085: watch_func (mainloop.c:105) by 0x4C72694: g_main_context_dispatch (gmain.c:2539) by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146) by 0x4C72DC1: g_main_loop_run (gmain.c:3340) by 0x120541: main (main.c:551) Address 0x5bbcd90 is 16 bytes inside a block of size 24 free'd at 0x4A079AE: free (vg_replace_malloc.c:427) by 0x4C7837E: g_free (gmem.c:252) by 0x4F708BF: dbus_watch_set_data (dbus-watch.c:614) by 0x4F70938: _dbus_watch_unref (dbus-watch.c:132) by 0x4F6E9A7: _dbus_transport_handle_watch (dbus-transport.c:884) by 0x4F59AFB: _dbus_connection_handle_watch (dbus-connection.c:1497) by 0x4F70AF9: dbus_watch_handle (dbus-watch.c:683) by 0x121084: watch_func (mainloop.c:103) by 0x4C72694: g_main_context_dispatch (gmain.c:2539) by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146) by 0x4C72DC1: g_main_loop_run (gmain.c:3340) by 0x120541: main (main.c:551)
2014-09-08gdbus: Fix crash when calling g_dbus_add_service_watchLuiz Augusto von Dentz1-1/+0
If g_dbus_add_service_watch is called for service which bus name is already known the following crash can happen: invalid read of size 1 at 0x4C2A2F2: strlen (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E97722: g_strdup (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x405B0C: update_name_cache (watch.c:435) by 0x405C37: update_service (watch.c:593) by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4038EA: client_ready (test-gdbus-client.c:1014) by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x403614: main (test-gdbus-client.c:1058) Address 0x5dbe5d0 is 0 bytes inside a block of size 7 free'd at 0x4C28577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FF7E: g_free (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x405B04: update_name_cache (watch.c:434) by 0x405C37: update_service (watch.c:593) by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4038EA: client_ready (test-gdbus-client.c:1014) by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x403614: main (test-gdbus-client.c:1058)
2014-09-08Revert "gdbus: Don't include just added interfaces in GetManagedObjects"Luiz Augusto von Dentz1-7/+1
This actually creates a problem since the code now does flush any pending message on the queue any signal will be send right away before the actual reply to GetManagedObjects which will not contain those interfaces.
2014-09-08gdbus: Fix use after freeAndrei Emeltchenko1-3/+8
Refactor filter_data_remove_callback so that we do not iterate over freed pointer.
2014-09-08gdbus: Avoid reporting GDBusClient disconnect twiceClaudio Takahasi1-2/+12
No matter if disconnection was reported previously, g_dbus_client_unref() was always calling service disconnect callback. This patch fix the following scenario: 1) service disconnects from the bus 2) disconnect callback gets called 3) client calls g_dbus_client_unref(), disconnect callback is called again.
2014-09-05AUTHORS: Mention Slava's contributionsPatrik Flykt1-0/+1
2014-09-05client: Detach threads since they are never joinedSlava Monich1-1/+10
Unless the threads are created as detached (or joined, which is not the case here), not all resources will be released when the thread exits. If not handled, this causes unlimited memory usage over time.
2014-03-24gdbus: Add g_dbus_proxy_set_property_arrayClaudio Takahasi2-0/+92
This patch adds a new gdbus utility function to allow setting a property of fixed, and non-fixed values array.
2014-03-06gdbus: Add g_dbus_client_set_ready_watch()Claudio Takahasi2-1/+20
This patch adds a new gdbus helper to notify the clients that GetManagedObjects reply was received and the last proxy has been informed previously by the proxy_added callback.
2014-02-18gdbus: Replace g_timeout_add with g_idle_addLuiz Augusto von Dentz1-4/+1
Passing 0 as timeout to g_timeout_add should equivalent to g_idle_add.
2014-02-18gdbus: Fix incorrect DBusConnection reference countingAnderson Lizardo1-10/+4
Commit abfc2b0dd5c3e33abfdf1a815b16d492c1751c06 attempted to fix a crash related to improper reference counting, but the main issue was that the reference was taken only during the function call (which is usually unnecessary for single thread), but still passed a pointer to DBusConnection to a function that is called by the mainloop. This left a window where the DBusConnection can be destroyed. Fixes this crash on unit/test-gdbus-client: ==32642== Invalid read of size 4 ==32642== at 0x690D0A6: dbus_connection_ref (in /lib/i386-linux-gnu/libdbus-1.so.3.7.6) ==32642== by 0x804CEDB: message_dispatch (mainloop.c:73) ==32642== by 0x684580E: g_timeout_dispatch (gmain.c:4450) ==32642== by 0x6844A75: g_main_context_dispatch (gmain.c:3065) ==32642== by 0x6844E14: g_main_context_iterate.isra.23 (gmain.c:3712) ==32642== by 0x68452FA: g_main_loop_run (gmain.c:3906) ==32642== by 0x804C7D3: client_connect_disconnect (test-gdbus-client.c:188) ==32642== by 0x6868DB2: g_test_run_suite_internal (gtestutils.c:2067) ==32642== by 0x6868F8D: g_test_run_suite_internal (gtestutils.c:2138) ==32642== by 0x6869320: g_test_run_suite (gtestutils.c:2189) ==32642== by 0x686936B: g_test_run (gtestutils.c:1508) ==32642== by 0x696D4D2: (below main) (libc-start.c:226) ==32642== Address 0x709c6e4 is 140 bytes inside a block of size 144 free'd ==32642== at 0x67E806C: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==32642== by 0x692D62E: dbus_free (in /lib/i386-linux-gnu/libdbus-1.so.3.7.6) ==32642== by 0x690E1C2: ??? (in /lib/i386-linux-gnu/libdbus-1.so.3.7.6) ==32642== by 0x804AAEC: destroy_context (test-gdbus-client.c:104) ==32642== by 0x6868DB2: g_test_run_suite_internal (gtestutils.c:2067) ==32642== by 0x6868F8D: g_test_run_suite_internal (gtestutils.c:2138) ==32642== by 0x6869320: g_test_run_suite (gtestutils.c:2189) ==32642== by 0x686936B: g_test_run (gtestutils.c:1508) ==32642== by 0x696D4D2: (below main) (libc-start.c:226)
2014-02-18gdbus: Fix memory leakAnderson Lizardo1-0/+2
data->conn and data->path must be destroyed before freeing "data".
2014-02-05plugins: Do not try to resolve a wrongly formated hostnameTomasz Bursztyka2-1/+24
This will prevent to uselessly resolve a node which is not a valid hostname: when the node is an IPv6 address for instance. In order not to eat too much time when resolving a node. Note: Current PAC API is IPv4 only. For both IPv4/IPv6 support, a new API has been proposed by Microsoft (look for FindProxyforURLEx). Though one might argue it could have been better to fix legacy function rather than inventing new ones, this patch should not affect any later implementation of such API, like dnsResolveEx()/isInNetEx() etc... Reported by David Woodhouse <dwmw2@infradead.org>
2014-02-05unit: FTP comes before SOCKS* in protocol orderTomasz Bursztyka1-1/+1
Quick fix of "Manual configuration with exclusion" test, result was good but in wrong order from protocol point of view.
2014-02-05build: Undefine _FORTIFY_SOURCE before redefining itTomasz Bursztyka1-1/+1
This prevents such annoying warning: <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
2013-11-11gdbus: Fix trying to remove already removed sourcesBastien Nocera1-0/+3
When we return FALSE from idle handlers, the source is removed. This will be causing warnings in glib 2.40. See https://bugzilla.gnome.org/show_bug.cgi?id=710724
2013-10-14gdbus: Remove not needed check for NULL DBusPendingCallSzymon Janc1-5/+0
It is now checked by g_dbus_send_message_with_reply() so there is no need to double check that in caller.
2013-10-14gdbus: Check for NULL DBusPendingCall in g_dbus_send_message_with_replySzymon Janc1-1/+10
"Warning: if the connection is disconnected or you try to send Unix file descriptors on a connection that does not support them, the DBusPendingCall will be set to NULL, so be careful with this." Check this in g_dbus_send_message_with_reply so that callers don't need to double check for NULL if g_dbus_send_message_with_reply returned TRUE. This also fix crash if passing FD over D-Bus is blocked e.g. by SELinux policy. bluetoothd[1894]: profiles/audio/avdtp.c:session_cb() bluetoothd[1894]: profiles/audio/avdtp.c:avdtp_parse_cmd() Received SET_CONFIGURATION_CMD bluetoothd[1894]: profiles/audio/a2dp.c:endpoint_setconf_ind() Source 0x6c5000: Set_Configuration_Ind bluetoothd[1894]: profiles/audio/avdtp.c:avdtp_ref() 0x6df360: ref=1 bluetoothd[1894]: profiles/audio/a2dp.c:setup_ref() 0x6d32b0: ref=1 process 1894: arguments to dbus_pending_call_set_notify() were incorrect, assertion "pending != NULL" failed in file dbus-pending-call.c line 636. This is normally a bug in some application using the D-Bus library.
2013-09-12gdbus/client: Use g_dbus_add_properties_watch to track propertiesLuiz Augusto von Dentz1-79/+56
This make the handling much simpler and avoids duplicates of the same match rule.
2013-09-12gdbus/client: Use g_dbus_add_signal_watch to track signalsLuiz Augusto von Dentz1-36/+37
This make the handling much simpler and avoids duplicates of the same match rule.
2013-09-12gdbus/client: Use g_dbus_add_service_watch to track servicesLuiz Augusto von Dentz1-135/+38
This make the handling much simpler and avoids duplicates of the same match rule.
2013-09-12gdbus/watch: Fix crash when disconnecting from D-BusLuiz Augusto von Dentz1-0/+2
When disconnecting from D-Bus a message could be recieved with no sender: Invalid read of size 1 at 0x4A09EE1: strcmp (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x3B03C386B8: g_str_equal (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x4065D6: message_filter (watch.c:529) by 0x3B0700F9E5: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.4) by 0x4052E7: message_dispatch (mainloop.c:76) by 0x3B03C48962: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x3B03C47E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x3B03C48157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x3B03C48559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x4038C5: client_proxy_removed (test-gdbus-client.c:902) by 0x3B03C6B566: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x3B03C6B6E5: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3) Address 0x0 is not stack'd, malloc'd or (recently) free'd
2013-09-12gdbus/watch: Fix aborting when removing D-Bus filterLuiz Augusto von Dentz1-17/+8
In case of filter_data having a watch to a service name it may call dbus_connection_remove_filter twice causing libdbus to abort: process 24723: Attempt to remove filter function 0x4063e0 user data (nil), but no such filter has been added To fix this the code will now only attempt to call dbus_connection_remove_filter once in filter_data_free which is the counterpart of filter_data_get where dbus_connection_add_filter is called.
2013-09-12gdbus/watch: Fix crash when g_dbus_remove_watch is called from connect callbackLuiz Augusto von Dentz1-2/+6
at 0x40570C: update_service (watch.c:601) by 0x40584B: service_reply (watch.c:627) by 0x3B0700C511: ??? (in /usr/lib64/libdbus-1.so.3.7.4) by 0x3B0700F740: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.4) by 0x405167: message_dispatch (mainloop.c:76) by 0x3B03C48962: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x3B03C47E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x3B03C48157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x3B03C48559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3) Address 0x4c58a30 is 32 bytes inside a block of size 56 free'd at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x3B03C4D9AE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.3) by 0x406102: filter_data_remove_callback (watch.c:378) by 0x405FC0: g_dbus_remove_watch (watch.c:798) by 0x40A22B: g_dbus_client_unref (client.c:1227) by 0x40570B: update_service (watch.c:599) by 0x40584B: service_reply (watch.c:627)
2013-09-10gdbus: Fix emitting PropertiesChanged twiceLuiz Augusto von Dentz1-2/+2
This fixes double emission of PropertiesChanged introduced by flushing changes, the flushing can happen during the pending processing so the pending_prop flag needs to be updated in the beginning and the list of properties can be freed before g_dbus_send_message as it is not required anymore.
2013-09-10gdbus: Avoid calling dbus_connection_send*Luiz Augusto von Dentz2-64/+42
dbus_connection_send* should not be called directly except by g_dbus_send_message.
2013-09-10gdbus: Add g_dbus_send_message_with_replyLuiz Augusto von Dentz2-0/+14
g_dbus_send_message_with_reply flushes pending signals before calling dbus_connection_send_with_reply so it does not alter the message order
2013-09-10gdbus: Fix sending ObjectManager/Properties signals out of orderLuiz Augusto von Dentz1-16/+53
In some cases the order of the messages is altered when a message is sent without processing the pending signals first, currently this affect client_check_order unit test: /gdbus/client_check_order: ** ERROR:unit/test-gdbus-client.c:795:property_check_order: assertion failed: (g_strcmp0(string, "value1") == 0) As can be observed the value of the property is not yet updated because the signal it is still pending, once this fix is applied the test pass: /gdbus/client_check_order: OK Note that the flushing only works when g_dbus_send_message is used so places where dbus_connection_send and other variants are called directly may still change the order.
2013-09-05AUTHORS: Update list with recent contributorsMarcel Holtmann1-1/+3
2013-09-05Release 0.80.8Marcel Holtmann2-1/+5
2013-09-04pacrunner: Fix pacrunner autostartPatrik Flykt1-1/+1
ConnMan disables autostart in its pacrunner D-Bus method calls and will not unnecessarily start pacrunner.
2013-08-26main: Use gboolean type in GOptionEntryPatrik Flykt3-4/+4
The GOptionEntry options need to be of gboolean type as they are passed as pointers. When the size of gboolean is different from the size of bool, it will cause option variables to be overwritten by each other.
2013-08-20manual: Remove extra newlinePatrik Flykt1-2/+1
2013-08-20unit: Do not compare expression against NULLDaniel Wagner1-50/+50
This patch generate via coccinelle with: @ disable is_null,isnt_null1 @ expression E; @@ ( - E == NULL + !E | - E != NULL + E )
2013-08-20tools: Do not compare expression against NULLDaniel Wagner1-58/+58
This patch generate via coccinelle with: @ disable is_null,isnt_null1 @ expression E; @@ ( - E == NULL + !E | - E != NULL + E )
2013-08-20core: Do not compare expression against NULLDaniel Wagner7-93/+93
This patch generate via coccinelle with: @ disable is_null,isnt_null1 @ expression E; @@ ( - E == NULL + !E | - E != NULL + E )
2013-08-20plugins: Do not compare expression against NULLDaniel Wagner2-10/+10
This patch generate via coccinelle with: @ disable is_null,isnt_null1 @ expression E; @@ ( - E == NULL + !E | - E != NULL + E )
2013-08-20libproxy: Do not compare expression against NULLDaniel Wagner1-21/+21
This patch generate via coccinelle with: @ disable is_null,isnt_null1 @ expression E; @@ ( - E == NULL + !E | - E != NULL + E )
2013-08-20unit: Convert to stdbool with coccinelleDaniel Wagner1-25/+25
This patch is completely generated by set of coccille rules and containts zero manual changes. This conversion contains two steps: 1) Use stdbool instead gboolean where possible 2) Do not compare explicit against boolean values The rules are as following: @@ expression E; symbol TRUE; symbol FALSE; @@ ( E - == TRUE | - TRUE == E + E | - E != TRUE + !E | - TRUE != E + !E | - E == FALSE + !E | - FALSE == E + !E | E - != FALSE | - FALSE != E + E ) // This is not a beautiful script but it does the job. // Improvemtents are welcome. // Fix all assigments but do not convert yet the type @@ gboolean x; @@ x = ( - TRUE + true | - FALSE + false ) // Figure out which function signature will to be fixed... // when we have the defitition @r@ identifier f; parameter list[n] ps; identifier i; @@ f(ps, gboolean i, ...) { ... } // ... and now convert all call sites @@ identifier r.f; expression list [r.n] es; @@ f(es, ( - FALSE + false | - TRUE + true ) ,...) // Figure out which function signature will to be fixed... // when we have the declaration only @r2@ type T; identifier f; parameter list[n] ps; identifier i; @@ T f(ps, gboolean i, ...); // ... and now convert all call sites @@ identifier r2.f; expression list [r.n] es; @@ f(es, ( - FALSE + false | - TRUE + true ) ,...) // A handfull of the GLib hooks we can't change. Let's remember // all ther positions. // 1. timeouts @k1@ identifier f; position p; typedef gpointer; identifier ptr; @@ static gboolean@p f(gpointer ptr); @k2@ identifier f; position p; identifier ptr; @@ static gboolean@p f(gpointer ptr) { ... } // hash map iterator functions @k3@ identifier f; position p; identifier p1, p2, p3; @@ static gboolean@p f(gpointer p1, gpointer p2, gpointer p3) { ... } // 2. GIOChannel @k4@ identifier f; position p; typedef GIOChannel, GIOCondition; identifier ptr; identifier ch, cn; @@ static gboolean@p f(GIOChannel *ch, GIOCondition cn, gpointer ptr); @k5@ identifier f; position p; identifier ptr; identifier ch, cn; @@ static gboolean@p f(GIOChannel *ch, GIOCondition cn, gpointer ptr) { ... } // 3. GSourceFuncs @k6@ identifier f; position p; typedef GSource; identifier src; @@ static gboolean@p f(GSource *src, ...) { ... } // gdbus functions @k7@ identifier f; position p; typedef DBusConnection; identifier con; @@ static gboolean@p f(DBusConnection *con, ...) { ... } // Now convert all gboolean which are are not used for interactin // with GLib // Note here happens the magic! @@ typedef bool; position p != {k1.p,k2.p,k3.p,k4.p,k5.p,k6.p,k7.p}; @@ - gboolean@p + bool // Update all return types @@ identifier f; @@ bool f(...) { <... - return TRUE; + return true; ...> } @@ identifier f; @@ bool f(...) { <... - return FALSE; + return false; ...> }
2013-08-20tools: Convert to stdbool with coccinelleDaniel Wagner1-37/+37
This patch is completely generated by set of coccille rules and containts zero manual changes. This conversion contains two steps: 1) Use stdbool instead gboolean where possible 2) Do not compare explicit against boolean values The rules are as following: @@ expression E; symbol TRUE; symbol FALSE; @@ ( E - == TRUE | - TRUE == E + E | - E != TRUE + !E | - TRUE != E + !E | - E == FALSE + !E | - FALSE == E + !E | E - != FALSE | - FALSE != E + E ) // This is not a beautiful script but it does the job. // Improvemtents are welcome. // Fix all assigments but do not convert yet the type @@ gboolean x; @@ x = ( - TRUE + true | - FALSE + false ) // Figure out which function signature will to be fixed... // when we have the defitition @r@ identifier f; parameter list[n] ps; identifier i; @@ f(ps, gboolean i, ...) { ... } // ... and now convert all call sites @@ identifier r.f; expression list [r.n] es; @@ f(es, ( - FALSE + false | - TRUE + true ) ,...) // Figure out which function signature will to be fixed... // when we have the declaration only @r2@ type T; identifier f; parameter list[n] ps; identifier i; @@ T f(ps, gboolean i, ...); // ... and now convert all call sites @@ identifier r2.f; expression list [r.n] es; @@ f(es, ( - FALSE + false | - TRUE + true ) ,...) // A handfull of the GLib hooks we can't change. Let's remember // all ther positions. // 1. timeouts @k1@ identifier f; position p; typedef gpointer; identifier ptr; @@ static gboolean@p f(gpointer ptr); @k2@ identifier f; position p; identifier ptr; @@ static gboolean@p f(gpointer ptr) { ... } // hash map iterator functions @k3@ identifier f; position p; identifier p1, p2, p3; @@ static gboolean@p f(gpointer p1, gpointer p2, gpointer p3) { ... } // 2. GIOChannel @k4@ identifier f; position p; typedef GIOChannel, GIOCondition; identifier ptr; identifier ch, cn; @@ static gboolean@p f(GIOChannel *ch, GIOCondition cn, gpointer ptr); @k5@ identifier f; position p; identifier ptr; identifier ch, cn; @@ static gboolean@p f(GIOChannel *ch, GIOCondition cn, gpointer ptr) { ... } // 3. GSourceFuncs @k6@ identifier f; position p; typedef GSource; identifier src; @@ static gboolean@p f(GSource *src, ...) { ... } // gdbus functions @k7@ identifier f; position p; typedef DBusConnection; identifier con; @@ static gboolean@p f(DBusConnection *con, ...) { ... } // Now convert all gboolean which are are not used for interactin // with GLib // Note here happens the magic! @@ typedef bool; position p != {k1.p,k2.p,k3.p,k4.p,k5.p,k6.p,k7.p}; @@ - gboolean@p + bool // Update all return types @@ identifier f; @@ bool f(...) { <... - return TRUE; + return true; ...> } @@ identifier f; @@ bool f(...) { <... - return FALSE; + return false; ...> }
2013-08-20core: Convert to stdbool with coccinelleDaniel Wagner7-84/+83
This patch is completely generated by set of coccille rules and containts zero manual changes. This conversion contains two steps: 1) Use stdbool instead gboolean where possible 2) Do not compare explicit against boolean values The rules are as following: @@ expression E; symbol TRUE; symbol FALSE; @@ ( E - == TRUE | - TRUE == E + E | - E != TRUE + !E | - TRUE != E + !E | - E == FALSE + !E | - FALSE == E + !E | E - != FALSE | - FALSE != E + E ) // This is not a beautiful script but it does the job. // Improvemtents are welcome. // Fix all assigments but do not convert yet the type @@ gboolean x; @@ x = ( - TRUE + true | - FALSE + false ) // Figure out which function signature will to be fixed... // when we have the defitition @r@ identifier f; parameter list[n] ps; identifier i; @@ f(ps, gboolean i, ...) { ... } // ... and now convert all call sites @@ identifier r.f; expression list [r.n] es; @@ f(es, ( - FALSE + false | - TRUE + true ) ,...) // Figure out which function signature will to be fixed... // when we have the declaration only @r2@ type T; identifier f; parameter list[n] ps; identifier i; @@ T f(ps, gboolean i, ...); // ... and now convert all call sites @@ identifier r2.f; expression list [r.n] es; @@ f(es, ( - FALSE + false | - TRUE + true ) ,...) // A handfull of the GLib hooks we can't change. Let's remember // all ther positions. // 1. timeouts @k1@ identifier f; position p; typedef gpointer; identifier ptr; @@ static gboolean@p f(gpointer ptr); @k2@ identifier f; position p; identifier ptr; @@ static gboolean@p f(gpointer ptr) { ... } // hash map iterator functions @k3@ identifier f; position p; identifier p1, p2, p3; @@ static gboolean@p f(gpointer p1, gpointer p2, gpointer p3) { ... } // 2. GIOChannel @k4@ identifier f; position p; typedef GIOChannel, GIOCondition; identifier ptr; identifier ch, cn; @@ static gboolean@p f(GIOChannel *ch, GIOCondition cn, gpointer ptr); @k5@ identifier f; position p; identifier ptr; identifier ch, cn; @@ static gboolean@p f(GIOChannel *ch, GIOCondition cn, gpointer ptr) { ... } // 3. GSourceFuncs @k6@ identifier f; position p; typedef GSource; identifier src; @@ static gboolean@p f(GSource *src, ...) { ... } // gdbus functions @k7@ identifier f; position p; typedef DBusConnection; identifier con; @@ static gboolean@p f(DBusConnection *con, ...) { ... } // Now convert all gboolean which are are not used for interactin // with GLib // Note here happens the magic! @@ typedef bool; position p != {k1.p,k2.p,k3.p,k4.p,k5.p,k6.p,k7.p}; @@ - gboolean@p + bool // Update all return types @@ identifier f; @@ bool f(...) { <... - return TRUE; + return true; ...> } @@ identifier f; @@ bool f(...) { <... - return FALSE; + return false; ...> }
2013-08-20tools: Include stdbool.hDaniel Wagner1-0/+1
In preparation for the conversion from gboolean to stdbools.
2013-08-20core: Include stdbool.hDaniel Wagner1-0/+2
In preparation for the conversion from gboolean to stdbools.
2013-08-20mozjs: Use pthread mutex instead of GLib versionsDaniel Wagner1-3/+4
GLib's thread API got deprecated 2.32. Fallback to use plain pthread APIs instead.
2013-07-11libproxy: Remove useless outputTomasz Bursztyka1-4/+0
Fixes #CM-647
2013-06-28Release 0.70.7Marcel Holtmann2-1/+8
2013-06-19gdbus: Remove proxies when client disconnectsHenrique Dante de Almeida1-0/+4
Remove proxies and generate proxy_removed callbacks even when there are no corresponding InterfaceRemoved signals. This patch fixes having zombie gdbus proxy object when a server disconnects without sending InterfaceRemoved signals. These objects may interact with new server instances, for example, making InterfaceAdded signals of new objects with the same name be filtered out as duplicated, or staying allocated, but unused, if the new server doesn't reuse the object paths. Note that as a side-effect, the lifetime of a gdbus proxy becomes stricter: it lives at most for the duration of a single connection to a single instance of a server process.
2013-06-17tools: Update manual-proxy-test tool according to latest fixesTomasz Bursztyka1-17/+133
2013-06-17unit: Update manual unit tests suitesTomasz Bursztyka2-5/+5
2013-06-17manual: Interpret url's protocol relevantly when generating proxy listTomasz Bursztyka1-8/+19
Protocols are also reordered so they appear in the list in a specific order.
2013-06-17libproxy: Support slicing the result string into relevant listTomasz Bursztyka1-39/+87
Fixes BMC#26021
2013-06-17manual: Add socks protocol supportTomasz Bursztyka1-8/+39
Fixes BMC#26020
2013-06-17manual: Support lists of result separated by a semicolonTomasz Bursztyka1-7/+51
2013-06-17manual: Fix output so it provides the prefix as expectedTomasz Bursztyka1-2/+28
Fixes BMC#26022
2013-05-08gdbus: Fix using NULL DBusPendingCall when disconnected from D-BusAnderson Lizardo1-0/+5
From D-Bus documentation for dbus_connection_send_with_reply(): "Warning: if the connection is disconnected or you try to send Unix file descriptors on a connection that does not support them, the DBusPendingCall will be set to NULL, so be careful with this." Fix these errors when killing D-Bus daemon with the client still running: process 5712: arguments to dbus_pending_call_set_notify() were incorrect, assertion "pending != NULL" failed in file ../../dbus/dbus-pending-call.c line 596. This is normally a bug in some application using the D-Bus library. process 5712: arguments to dbus_pending_call_unref() were incorrect, assertion "pending != NULL" failed in file ../../dbus/dbus-pending-call.c line 572. This is normally a bug in some application using the D-Bus library.
2013-05-08gdbus: Fix segfault when D-Bus daemon exitsAnderson Lizardo1-0/+2
Fix this crash if D-Bus exits while the client is still connected to it: ==5570== Invalid read of size 1 ==5570== at 0x402D28E: strcmp (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==5570== by 0x4070E22: g_str_equal (ghash.c:1704) ==5570== by 0x8055F61: message_filter (client.c:1123) ==5570== by 0x4141500: dbus_connection_dispatch (in /lib/i386-linux-gnu/libdbus-1.so.3.5.8) ==5570== by 0x80506F7: message_dispatch (mainloop.c:76) ==5570== by 0x4081A7E: g_timeout_dispatch (gmain.c:3882) ==5570== by 0x4080D85: g_main_context_dispatch (gmain.c:2539) ==5570== by 0x4081124: g_main_context_iterate.isra.21 (gmain.c:3146) ==5570== by 0x408156A: g_main_loop_run (gmain.c:3340) ==5570== by 0x41BF4D2: (below main) (libc-start.c:226) ==5570== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==5570== ==5570==
2013-05-03gdbus: Fix calling GetManagedObjects twice in a rowLuiz Augusto von Dentz1-7/+18
Calling g_dbus_client_new followed by g_dbus_client_set_proxy_handlers cause two calls to GetManagedObjects in a row as GetNameOwner reply is asyncronously it triggers the second call because the handlers have been set by g_dbus_client_set_proxy_handlers.
2013-04-18Fix isInNet() to work with non-Mozilla JS interpretersJoshua Lock1-1/+1
The isInNet() function relies on being able to call a regex as a function, which is invalid syntax in v8 and JSC. Modify isInNet to use the standard exec() method of the RegExpObject to test for a match.
2013-04-18Fix linking of unit testsJoshua Lock1-1/+1
2013-04-08gdbus: Use gcc builtin instead of g_atomicLucas De Marchi1-6/+6
g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to -Wunused-local-typedefs. gdbus/client.c: In function ‘g_dbus_client_ref’: /usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs] #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
2013-04-08gdbus: Fix not calling property_changed callbackLuiz Augusto von Dentz1-13/+10
In case a property did not appear by the time proxy_added was called property_changed has to be called if it appear latter otherwise the application will be unaware of it.
2013-02-23gdbus: Always unreference the message in g_dbus_send_message()Tomasz Bursztyka1-2/+3
A quick fix on g_dbus_send_message(), if check_signal() fails it returns FALSE without unreferencing the message as it should. This patch fixes it.
2013-02-15gdbus: Add g_dbus_proxy_set_removed_watchDenis Kenzior2-0/+20
2013-02-14gdbus: Fix missing PropertiesChanged signalVinicius Costa Gomes1-2/+5
If D-Bus ObjectManager is not supported, InterfacesAdded signal checking needs to be ignored otherwise PropertiesChanged signal will never be sent.
2013-02-11gdbus: Don't call property changed callback during client initMarcel Holtmann1-9/+10
When the client uses ObjectManager to init properties, do not call property changed callbacks. They should only be called once the proxy added has been successfully signaled since the proxy itself provides a full copy of available properties.
2013-02-01gdbus: Fix unpublished interface signal emissionJohan Hedberg1-0/+4
If we haven't published an interface yet (i.e. it's in the data->added list), we should just ignore any property changed indications as the values for the properties will anyway be part of the InterfacesAdded signal.
2013-01-31build: Replace GTHread library with pthreadTomasz Bursztyka2-11/+13
2013-01-31unit: Remove obsolete g_thread_init() callTomasz Bursztyka1-3/+0
2013-01-31main: Remove obsolete g_thread_init() callTomasz Bursztyka1-3/+0
2013-01-31client: Use pthread instead of obsolete g_thread APITomasz Bursztyka1-5/+5
2013-01-31proxy: Switch to pthread for mutex and condition handlingTomasz Bursztyka1-29/+27
2013-01-30build: Use AM_CPPFLAGS instead of INCLUDESLucas De Marchi1-1/+1
Makefile.am:141: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2013-01-30build: Do not use deprecated AM_CONFIG_HEADERLucas De Marchi1-1/+1
The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13. Use AC_CONFIG_HEADERS instead.
2013-01-20gdbus: Check for valid path before handling propertiesMarcel Holtmann1-0/+6
2013-01-06gdbus: Fix memory leak on properties_set()Anderson Lizardo1-1/+6
The pointer returned by dbus_message_iter_get_signature() must be freed with dbus_free(). Fixes this memory leak: ==1857== 16 bytes in 1 blocks are definitely lost in loss record 104 of 251 ==1857== at 0x402BF52: realloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==1857== by 0x415E286: dbus_realloc (in /lib/i386-linux-gnu/libdbus-1.so.3.5.8) ==1857== by 0x415E70B: ??? (in /lib/i386-linux-gnu/libdbus-1.so.3.5.8) ==1857== by 0x415F17B: ??? (in /lib/i386-linux-gnu/libdbus-1.so.3.5.8) ==1857== by 0x414CB33: dbus_message_iter_get_signature (in /lib/i386-linux-gnu/libdbus-1.so.3.5.8) ==1857== by 0x8053239: properties_set (object.c:899) ==1857== by 0x5FFFFF: ??? ==1857==
2013-01-05gdbus: Check signature of property value before calling setterMarcel Holtmann1-0/+5
2013-01-03gdbus: Don't include just added interfaces in GetManagedObjectsLucas De Marchi1-1/+7
If we received a call to ObjectManager.GetManagedObject we should not include in the response the interfaces in data->added. This is because it's not guaranteed that those interfaces will trigger an InterfacesAdded signal, which is the case if the interface is removed in the same mainloop iteration.
2013-01-03gdbus: Simplify generated introspectionLucas De Marchi1-65/+38
The generated introspection is not supposed to be read as is by human, so there's no point in printing the indentation or writing more code to use auto-close tags. If it's desired to read the raw xml file, user can always use other tools to transform the output such as "xmllint --format". This also fixes a missing </property> when property is deprecated.
2013-01-02gdbus: Hold client reference during get name owner replyMarcel Holtmann1-0/+4
2012-12-30gdbus: Call check_signals when sending signals with g_dbus_send_messageLuiz Augusto von Dentz1-0/+9
If message passed to g_dbus_send_message is a signal verify if it is a valid and there really exists an interface with respective signal name.
2012-12-30gdbus: Check if the interface being registered is validLuiz Augusto von Dentz1-6/+36
This prevent registering interfaces that are empty or have all members marked as experiemental.
2012-12-30gdbus: Introduce G_DBUS_PROPERTY_FLAG_EXPERIMENTALLuiz Augusto von Dentz2-18/+33
This flag can be used to mark properties as experimental, marked properties are disabled by default and can be enabled by setting G_DBUS_FLAG_ENABLE_EXPERIMENTAL using g_dbus_set_flags.
2012-12-30gdbus: Introduce G_DBUS_SIGNAL_FLAG_EXPERIMENTALLuiz Augusto von Dentz2-4/+23
This flag can be used to mark signals as experimental, marked signals are disabled by default and can be enabled by setting G_DBUS_FLAG_ENABLE_EXPERIMENTAL using g_dbus_set_flags.
2012-12-30gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTALLuiz Augusto von Dentz2-3/+45
This flag can be used to mark methods as experimental, marked methods are disable by default and can be enabled by setting G_DBUS_FLAG_ENABLE_EXPERIMENTAL using g_dbus_set_flags.
2012-12-30gdbus: Include changed properties only once per signalMarcel Holtmann1-0/+3
2012-12-29gdbus: Update properties on D-Bus client re-connectionsMarcel Holtmann1-4/+22
2012-12-29gdbus: Add function to manually refresh propertiesMarcel Holtmann2-0/+85
2012-12-29gdbus: Add support for proxy property change notificationsMarcel Holtmann2-4/+30
2012-12-29gdbus: Fix handling of client connect/disconnect signalsMarcel Holtmann1-11/+12
2012-12-29gdbus: Protect standalone proxy creation with client referenceMarcel Holtmann1-10/+8
2012-12-28gdbus: Use object manager only if callback functions are setMarcel Holtmann1-8/+7
2012-12-28gdbus: Use client service name and not hardcoded org.bluezMarcel Holtmann1-1/+1
2012-12-28gdbus: Add support for creating D-Bus proxies without object managerMarcel Holtmann2-62/+147
2012-12-22Release 0.60.6Marcel Holtmann2-1/+4
2012-12-22gdbus: Avoid using g_ptr_array_new_full convenience functionMarcel Holtmann1-1/+2
The g_ptr_array_new_full function only got introduced with GLib 2.30 and to avoid requiring a newer GLib use g_ptr_array_set_free_func instead.
2012-12-19build: Compile support for new D-Bus client helpersMarcel Holtmann1-1/+1
2012-12-19gdbus: Increase the method call timeout to 5 minutesMarcel Holtmann1-1/+3
2012-12-19gdbus: Add helper for sending async error repliesMarcel Holtmann2-0/+38
2012-12-19gdbus: Fix race condition with creating duplicate client proxiesMarcel Holtmann1-0/+23
2012-12-19gdbus: Fix issue with unref of client while parsing interfacesMarcel Holtmann1-0/+8
2012-12-19gdbus: Fix issue with unref of client in connect handlerMarcel Holtmann1-0/+8
2012-12-19gdbus: Add support for D-Bus client method callsMarcel Holtmann2-0/+82
2012-12-19gdbus: Add callback support for handling property changesMarcel Holtmann2-10/+31
2012-12-19gdbus: Handle property changed signals and update propertyMarcel Holtmann1-31/+107
2012-12-19gdbus: Set property changed filter match rule for each proxyMarcel Holtmann1-40/+57
2012-12-19gdbus: Use a GPtrArray for the match rulesMarcel Holtmann1-18/+24
2012-12-19gdbus: Add support for setting D-Bus client basic propertiesMarcel Holtmann2-0/+99
2012-12-19gdbus: Deep copy of variants also requires a signatureMarcel Holtmann1-2/+7
2012-12-19gdbus: Add support for complex D-Bus client propertiesMarcel Holtmann1-16/+46
2012-12-19gdbus: Add support for D-Bus client propertiesMarcel Holtmann2-3/+126
2012-12-19gdbus: Add support for D-Bus client proxiesMarcel Holtmann2-4/+343
2012-12-19gdbus: Add helper functions for simple D-Bus clientsMarcel Holtmann2-0/+355
2012-11-30gdbus: Add g_dbus_add_properties_watch functionLuiz Augusto von Dentz2-0/+33
Convenient function to create watches for D-Bus properties.
2012-11-29gdbus: Don't automatically attach ObjectManagerLucas De Marchi2-21/+36
Let each project attach the object manager interface instead of registering it automatically.
2012-11-29gdbus: Don't register DBus.Properties with no propertiesLucas De Marchi1-3/+6
Delay registering DBus.Properties interface until the moment there are properties on that path. This is needed for objects that currently don't expose any property to not export the interface.
2012-11-26gdbus: Remove not needed NULL pointer checksSzymon Janc1-2/+2
g_strdup returns NULL if argument passed is NULL and there is no need to double check that.
2012-11-26gdbus: Replace leading spaces with tabsSyam Sidhardhan1-4/+4
Trivial formatting fix.