forked from enlightenment/efl
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
This commit is contained in:
parent
8c67bafaf2
commit
9e1f5d80fe
|
@ -780,6 +780,7 @@ cb_signal_dispatcher(EDBus_Connection *conn, DBusMessage *msg)
|
|||
&edbus_msg->iterator->dbus_iterator);
|
||||
|
||||
edbus_connection_ref(conn);
|
||||
edbus_init();
|
||||
/*
|
||||
* Do the walking open-coded so we don't crash if a callback
|
||||
* removes other signal handlers from the list and we don't own
|
||||
|
@ -841,6 +842,7 @@ cb_signal_dispatcher(EDBus_Connection *conn, DBusMessage *msg)
|
|||
|
||||
edbus_message_unref(edbus_msg);
|
||||
edbus_connection_unref(conn);
|
||||
edbus_shutdown();
|
||||
}
|
||||
|
||||
static DBusHandlerResult
|
||||
|
|
Loading…
Reference in New Issue