From: Michael Albinus Date: Sun, 31 Mar 2024 17:59:58 +0000 (+0200) Subject: Fix wildcard signals in dbusbind.c X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0f7a3879e853658c3f34835ebc857cda100c5d8c;p=emacs.git Fix wildcard signals in dbusbind.c * src/dbusbind.c (xd_read_message_1): Handle registered signals with wildcards. (Bug#69926) (cherry picked from commit 09f381d70d8852d90cdd3c8d7e1e2786dbc61f92) --- diff --git a/src/dbusbind.c b/src/dbusbind.c index 7069e27e3eb..0441b07a3b2 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1689,6 +1689,22 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) bus, build_string (interface), build_string (member)); value = Fgethash (key, Vdbus_registered_objects_table, Qnil); + /* A signal could be registered with a nil interface or member. */ + if (mtype == DBUS_MESSAGE_TYPE_SIGNAL) + { + key = list4 (QCsignal, bus, Qnil, build_string (member)); + value = CALLN (Fappend, value, + Fgethash (key, Vdbus_registered_objects_table, Qnil)); + + key = list4 (QCsignal, bus, build_string (interface), Qnil); + value = CALLN (Fappend, value, + Fgethash (key, Vdbus_registered_objects_table, Qnil)); + + key = list4 (QCsignal, bus, Qnil, Qnil); + value = CALLN (Fappend, value, + Fgethash (key, Vdbus_registered_objects_table, Qnil)); + } + /* Loop over the registered functions. Construct an event. */ for (; !NILP (value); value = CDR_SAFE (value)) {