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

git pushed a commit to branch connman-backend
in repository enlightenment.

View the commit online.

commit 39768b0332f300d68a5f854db983096a2329efd0
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Aug 3 14:43:20 2026 -0600

    networkmanager - survive a daemon restarting underneath us
    
    Three things went wrong when connmand or NetworkManager went away and
    came back.
    
    The name owner handler bailed out early if it still held a manager, on
    the assumption that meant it was already up. A restart can arrive as a
    single owner change rather than a loss followed by a gain, and the
    daemon behind those proxies is gone either way, so start over instead.
    
    An open popup keeps a pointer to a service per row, and genlist realizes
    rows when it needs them rather than up front, so a manager going away
    under one left it dereferencing freed services the moment it drew
    anything. The popup is built from the manager, so it now goes when the
    manager does.
    
    While in there: say why the proxy environment export is connman-only,
    which is not obvious from a file that never mentions NetworkManager.
---
 src/modules/networkmanager/e_mod_main.c      |  8 ++++++++
 src/modules/networkmanager/enm_net_connman.c | 18 +++++++++++++++---
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/src/modules/networkmanager/e_mod_main.c b/src/modules/networkmanager/e_mod_main.c
index 4c6c5f726..246cd2bdc 100644
--- a/src/modules/networkmanager/e_mod_main.c
+++ b/src/modules/networkmanager/e_mod_main.c
@@ -1720,6 +1720,14 @@ _enm_mod_manager_inout(E_Net_Manager *mgr)
    E_NM_Instance *inst;
 
    DBG("Manager %s", mgr ? "in" : "out");
+
+   /* Every row in an open popup points at a service of the outgoing manager,
+    * and genlist realizes rows as they are needed rather than up front, so a
+    * daemon going away or restarting under one would leave it dereferencing
+    * freed services.  It is all built from the manager anyway - close it and
+    * let the next one be built from whatever is there now. */
+   enm_popups_del();
+
    ctxt->mgr = mgr;
 
    EINA_LIST_FOREACH(ctxt->instances, l, inst)
diff --git a/src/modules/networkmanager/enm_net_connman.c b/src/modules/networkmanager/enm_net_connman.c
index ae14339d9..31b547d71 100644
--- a/src/modules/networkmanager/enm_net_connman.c
+++ b/src/modules/networkmanager/enm_net_connman.c
@@ -256,8 +256,16 @@ _proxy_parse(Cm_Service *cs, Eldbus_Message_Iter *var)
      }
 }
 
-/* Push the proxy configuration of whichever service is actually carrying
- * traffic into the environment, or clear it when none is. */
+/*
+ * Push the proxy configuration of whichever service is actually carrying
+ * traffic into the environment, or clear it when none is.
+ *
+ * ConnMan only: it carries per-service proxy settings and the old connman
+ * module exported them this way, so dropping it would be a regression for
+ * the people this merge is meant to serve.  NetworkManager keeps proxy
+ * configuration out of the connection profile, so there is nothing to
+ * mirror there and the neutral model has no place for it.
+ */
 static void
 _proxy_sync(void)
 {
@@ -925,7 +933,11 @@ _cb_name_owner_changed(void *data EINA_UNUSED, const char *bus EINA_UNUSED,
 {
    if (to && to[0])
      {
-        if (_mgr) return;   /* already up */
+        /* A restart can arrive as a single owner change rather than a loss
+         * followed by a gain, and the connmand on the other end of the old
+         * proxies is gone either way, so start over rather than assume what
+         * is held is still good. */
+        if (_mgr) _manager_teardown();
         INF("connman appeared");
         _manager_setup();
         enm_net_notify_manager_inout(_mgr);

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

Reply via email to