This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch make-bluez-bat-reappear
in repository enlightenment.

View the commit online.

commit a52fe4b5bc3097d978cee6e8f8d02481dd3dc77b
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Tue Jun 24 21:36:16 2025 +0100

    bluez fix vanishing obj if we see iface remove double check via get props
    
    so we see an interfaceremoved from dbus for a bz obj - but it actually
    isnt removed. why se see this? i don't know... tha'ts odd. but it's
    stil there.. so double check and get properties - if we can without
    error the obj is not gone - if there is an error from dbus.. it is
    gone.
    
    @fix
---
 src/modules/bluez5/bz_obj.c | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/modules/bluez5/bz_obj.c b/src/modules/bluez5/bz_obj.c
index 722a5623d..cd222238a 100644
--- a/src/modules/bluez5/bz_obj.c
+++ b/src/modules/bluez5/bz_obj.c
@@ -922,9 +922,27 @@ cb_obj_add(void *data EINA_UNUSED, const Eldbus_Message *msg)
 
    if (!eldbus_message_arguments_get(msg, "o", &path)) return;
    if (bz_obj_find(path)) return;
+   printf("BZ: cb_obj_add [%s]\n", path);
    bz_obj_add(path);
 }
 
+static void
+cb_obj_del_prop(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
+{
+  Obj *o = data;
+  if (eldbus_message_error_get(msg, NULL, NULL))
+    { // prop get error - obj really gone
+      bz_obj_ref(o);
+      if (o->fn_del) o->fn_del(o);
+      bz_obj_unref(o);
+      bz_obj_unref(o);
+      printf("BZ: cb_obj_del_prop %p really is gone\n", o);
+      return;
+    }
+  printf("BZ: cb_obj_del_prop %p not gone\n", o);
+  // we managed to get props ... the obj is not really gone
+}
+
 static void
 cb_obj_del(void *data EINA_UNUSED, const Eldbus_Message *msg)
 {
@@ -933,12 +951,10 @@ cb_obj_del(void *data EINA_UNUSED, const Eldbus_Message *msg)
 
    if (!eldbus_message_arguments_get(msg, "o", &path)) return;
    o = bz_obj_find(path);
+   printf("BZ: cb_obj_del [%s] found = %p\n", path, o);
    if (o)
-     {
-        bz_obj_ref(o);
-        if (o->fn_del) o->fn_del(o);
-        bz_obj_unref(o);
-        bz_obj_unref(o);
+     { // check if a prop fetch errs or is ok to check its really gone
+        eldbus_proxy_property_get_all(o->proxy, cb_obj_del_prop, o);
      }
 }
 
@@ -961,6 +977,7 @@ cb_getobj(void *data EINA_UNUSED, const Eldbus_Message *msg,
                {
                   return;
                }
+             printf("BZ: cb_getobj [%s]\n", path);
              bz_obj_add(path);
           }
      }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to