summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Roberto de Souza <zehortigoza@profusion.mobi>2013-01-03 14:05:45 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2013-01-03 14:05:45 +0000
commit9e1f5d80fedd1b8ddead3be5eb9653e76ed4b2cb (patch)
tree2bfa205016cd5c7cd0d7a07e228c0a28ea506db1 /src
parent8c67bafaf240a07d8892b5a71581abf1aecd2798 (diff)
edbus: Increment/decrement edbus refcount when processing signals
This allows the user to shutdown edbus inside a signal callback. Patch by: José Roberto de Souza <zehortigoza@profusion.mobi> SVN revision: 82071
Diffstat (limited to 'src')
-rw-r--r--src/lib/edbus/edbus_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/edbus/edbus_core.c b/src/lib/edbus/edbus_core.c
index 709420f986..1d47ee7c60 100644
--- a/src/lib/edbus/edbus_core.c
+++ b/src/lib/edbus/edbus_core.c
@@ -780,6 +780,7 @@ cb_signal_dispatcher(EDBus_Connection *conn, DBusMessage *msg)
780 &edbus_msg->iterator->dbus_iterator); 780 &edbus_msg->iterator->dbus_iterator);
781 781
782 edbus_connection_ref(conn); 782 edbus_connection_ref(conn);
783 edbus_init();
783 /* 784 /*
784 * Do the walking open-coded so we don't crash if a callback 785 * Do the walking open-coded so we don't crash if a callback
785 * removes other signal handlers from the list and we don't own 786 * removes other signal handlers from the list and we don't own
@@ -841,6 +842,7 @@ cb_signal_dispatcher(EDBus_Connection *conn, DBusMessage *msg)
841 842
842 edbus_message_unref(edbus_msg); 843 edbus_message_unref(edbus_msg);
843 edbus_connection_unref(conn); 844 edbus_connection_unref(conn);
845 edbus_shutdown();
844} 846}
845 847
846static DBusHandlerResult 848static DBusHandlerResult