Blob Blame History Raw
From 6c90ff0c0f8e4dce2d80cad8a042b2658bf68205 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
Date: Wed, 12 Sep 2018 13:22:34 +0200
Subject: [PATCH 26/28] sbus: do not try to remove signal listeners when
 disconnecting

This may cause some troubles if the dbus connection was dropped
as dbus will try to actually send the messages. Also when the
connectin is being freed, tevent integration is already disabled
so there is no point in doing this.

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit b821ee3ca93beb94a7a9b22b6f7a205e4900212e)
---
 src/sbus/router/sbus_router_hash.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/sbus/router/sbus_router_hash.c b/src/sbus/router/sbus_router_hash.c
index 186dc613fc7874bfcce3f832c1c2299a217381d9..2d407b2fba12b6b57eed896e7154f85b0a65dcde 100644
--- a/src/sbus/router/sbus_router_hash.c
+++ b/src/sbus/router/sbus_router_hash.c
@@ -384,6 +384,10 @@ sbus_router_listeners_delete_cb(hash_entry_t *item,
         return;
     }

+    if (conn->disconnecting) {
+        return;
+    }
+
     /* If we still have the D-Bus connection available, we try to unregister
      * the previously registered listener when its removed from table. */

--
2.14.4