zehortigoza pushed a commit to branch master.

commit 706072c746a961615067f6485a0dcbe3fab7f4cb
Author: José Roberto de Souza <[email protected]>
Date:   Sat Mar 23 14:43:05 2013 -0300

    eldbus: Fix interface_unregister()
---
 src/lib/eldbus_service.c | 13 ++++---------
 src/lib/eldbus_service.h |  4 ++--
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/lib/eldbus_service.c b/src/lib/eldbus_service.c
index b42b16e..98f76de 100644
--- a/src/lib/eldbus_service.c
+++ b/src/lib/eldbus_service.c
@@ -1082,17 +1082,12 @@ _on_connection_free(void *data, const void 
*dead_pointer EINA_UNUSED)
 EAPI void
 eldbus_service_interface_unregister(Eldbus_Service_Interface *iface)
 {
+   Eldbus_Service_Object *obj;
    ELDBUS_SERVICE_INTERFACE_CHECK(iface);
-   if (!eina_hash_find(iface->obj->interfaces, objmanager->name))
-     {
-        //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;
+   obj = iface->obj;
+   eina_hash_del(obj->interfaces, NULL, iface);
    _interface_free(iface);
+   obj->introspection_dirty = EINA_TRUE;
 }
 
 EAPI void
diff --git a/src/lib/eldbus_service.h b/src/lib/eldbus_service.h
index f36903b..5fa839d 100644
--- a/src/lib/eldbus_service.h
+++ b/src/lib/eldbus_service.h
@@ -110,8 +110,8 @@ EAPI Eldbus_Service_Interface 
*eldbus_service_interface_register(Eldbus_Connecti
 
 /**
  * @brief Unregister a interface.
- * If this is the last interface of the object path, the object path will be
- * removed too.
+ * Note: This doesn't unregister the object path if interface count reaches 0.
+ * Use eldbus_service_object_unregister() to unregister the object.
  */
 EAPI void eldbus_service_interface_unregister(Eldbus_Service_Interface *iface) 
EINA_ARG_NONNULL(1);
 

-- 

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk

Reply via email to