summaryrefslogtreecommitdiff
path: root/gdbus/mainloop.c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-31gdbus: Fix crash when getting disconnected from the busJohan Hedberg1-4/+5
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 the code already has a ref() call for it it's only natural to solve the issue by adding a local variable not dependent on "info". The backtrace of the crash fixed looks as follows: 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)
2012-04-16gdbus: Remove unneeded NEED_DBUS_WATCH_GET_UNIX_FD checkMarcel Holtmann1-4/+0
2011-03-09gdbus: Unconditionally remove D-Bus timeoutsGrant Erickson1-3/+0
Address an issue in which the daemon incorrectly handles D-Bus main loop timeouts by only removing timeouts that are not enabled when D-Bus requests a timeout removal.
2011-01-01gdbus: Update copyright informationMarcel Holtmann1-1/+1
2010-10-13gdbus: fix not handling bus disconnectsLuiz Augusto von Dentz1-0/+4
We where not dispatching data when a bus disconnects which cause Disconnected signal to not be processed and thus causing the process to either not exit or to not trigger callbacks registered with g_dbus_set_disconnect_function. To fix this now we always schedule a dispatch which will make sure data still not processed will make its way to the proper handlers even if disconnected.
2010-03-07Fix the case when the requested name is already in useVinicius Costa Gomes1-1/+5
We weren't setting the dbus error in this situation.
2010-01-27Remove unneeded use of status variableMarcel Holtmann1-8/+2
2010-01-27Introduce g_dbus_setup_private() to gdbusForrest Zhao1-13/+52
g_dbus_setup_private() is used to setup private DBusConnection
2010-01-02Cleanup of D-Bus mainloop integrationMarcel Holtmann1-84/+107
2010-01-01Update copyright information of D-Bus helper libraryMarcel Holtmann1-1/+1
2009-12-29Port gdbus to use g_dbus_add_signal_watchLuiz Augusto Von Dentz1-11/+10
2009-12-16Fix D-Bus timeout handlingDaniel Orstadius1-1/+16
Timeouts should also be removed in the remove_timeout callback in addition to the timeout_handler_free function. This is how dbus-glib does it and it seems to prevent crashes in certain situations.
2009-10-29Fix message handling for autostart.Claudio Takahasi1-0/+3
Current implementation of libdbus Request name is blocking, consequently the first incomming message that triggered the service autostart is not being processed properly.
2009-08-06Fix blocking service watch initial connect handlingMarcel Holtmann1-43/+0
2009-04-26Add D-Bus helper library for GLib integrationMarcel Holtmann1-0/+348