edbus: Remove object path of service if ObjectManager is the last optional iface
authorJosé Roberto de Souza <zehortigoza@profusion.mobi>
Thu, 20 Dec 2012 01:55:47 +0000 (01:55 +0000)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 20 Dec 2012 01:55:47 +0000 (01:55 +0000)
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81416

legacy/edbus/src/lib/edbus_service.c

index 45883bc..b39d1b9 100644 (file)
@@ -1458,5 +1458,8 @@ edbus_service_object_manager_detach(EDBus_Service_Interface *iface)
    ret = eina_hash_del(obj->interfaces, objmanager->name, NULL);
    obj->has_objectmanager = EINA_FALSE;
    obj->introspection_dirty = EINA_TRUE;
+   //properties + introspectable
+   if (eina_hash_population(iface->obj->interfaces) < 3)
+     edbus_service_object_unregister(iface);
    return ret;
 }