edbus: unref sent signal, also for complex types

SVN revision: 81310
This commit is contained in:
Lucas De Marchi 2012-12-18 21:38:43 +00:00
parent f0538fe576
commit 7b2ff200f8
2 changed files with 5 additions and 1 deletions

View File

@ -1247,7 +1247,6 @@ edbus_service_signal_emit(const EDBus_Service_Interface *iface, unsigned int sig
EINA_SAFETY_ON_FALSE_RETURN_VAL(r, EINA_FALSE);
edbus_service_signal_send(iface, sig);
edbus_message_unref(sig);
return EINA_TRUE;
}
@ -1257,6 +1256,7 @@ edbus_service_signal_send(const EDBus_Service_Interface *iface, EDBus_Message *s
EDBUS_SERVICE_INTERFACE_CHECK_RETVAL(iface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(signal_msg, EINA_FALSE);
_edbus_connection_send(iface->obj->conn, signal_msg, NULL, NULL, -1);
edbus_message_unref(sig);
return EINA_TRUE;
}

View File

@ -146,6 +146,10 @@ EAPI EDBus_Message *edbus_service_signal_new(const EDBus_Service_Interface *ifac
/**
* @brief Send a signal message.
*
* On success this will call edbus_message_unref() on the @param signal_msg,
* which is the intended behavior in 99% of the cases. Remember to increment
* the refcount if you want to keep it alive.
*/
EAPI Eina_Bool edbus_service_signal_send(const EDBus_Service_Interface *iface, EDBus_Message *signal_msg) EINA_ARG_NONNULL(1, 2);