forked from enlightenment/efl
eldbus: Fix interface_unregister()
This commit is contained in:
parent
9e4dc299a7
commit
12855e5fe7
|
@ -1082,17 +1082,12 @@ _on_connection_free(void *data, const void *dead_pointer EINA_UNUSED)
|
||||||
EAPI void
|
EAPI void
|
||||||
eldbus_service_interface_unregister(Eldbus_Service_Interface *iface)
|
eldbus_service_interface_unregister(Eldbus_Service_Interface *iface)
|
||||||
{
|
{
|
||||||
|
Eldbus_Service_Object *obj;
|
||||||
ELDBUS_SERVICE_INTERFACE_CHECK(iface);
|
ELDBUS_SERVICE_INTERFACE_CHECK(iface);
|
||||||
if (!eina_hash_find(iface->obj->interfaces, objmanager->name))
|
obj = iface->obj;
|
||||||
{
|
eina_hash_del(obj->interfaces, NULL, iface);
|
||||||
//properties + introspectable + iface that user wants unregister
|
|
||||||
if (eina_hash_population(iface->obj->interfaces) < 4)
|
|
||||||
eldbus_service_object_unregister(iface);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
eina_hash_del(iface->obj->interfaces, NULL, iface);
|
|
||||||
iface->obj->introspection_dirty = EINA_TRUE;
|
|
||||||
_interface_free(iface);
|
_interface_free(iface);
|
||||||
|
obj->introspection_dirty = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
|
|
@ -110,8 +110,8 @@ EAPI Eldbus_Service_Interface *eldbus_service_interface_register(Eldbus_Connecti
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Unregister a interface.
|
* @brief Unregister a interface.
|
||||||
* If this is the last interface of the object path, the object path will be
|
* Note: This doesn't unregister the object path if interface count reaches 0.
|
||||||
* removed too.
|
* Use eldbus_service_object_unregister() to unregister the object.
|
||||||
*/
|
*/
|
||||||
EAPI void eldbus_service_interface_unregister(Eldbus_Service_Interface *iface) EINA_ARG_NONNULL(1);
|
EAPI void eldbus_service_interface_unregister(Eldbus_Service_Interface *iface) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue