Some parts of systemd (at least the DBus activation codepath) "reply"
to signals, which of course have the no-reply flag set.  We will be
defensive here and still send out a reply if we're passed a signal.

Regression introduced by: c6a818c82035da91e

Reported-by: Mantas Mikulėnas <graw...@gmail.com>
Tested-by: Mantas Mikulėnas <graw...@gmail.com>
---
 src/shared/dbus-common.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)



>From e39e77dbaa82033ffd373e8d4976722a0c626ab8 Mon Sep 17 00:00:00 2001
From: Colin Walters <walt...@verbum.org>
Date: Fri, 22 Mar 2013 09:36:22 -0400
Subject: [PATCH] dbus: Do send out "replies" to signals
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Some parts of systemd (at least the DBus activation codepath) "reply"
to signals, which of course have the no-reply flag set.  We will be
defensive here and still send out a reply if we're passed a signal.

Regression introduced by: c6a818c82035da91e

Reported-by: Mantas Mikulėnas <graw...@gmail.com>
Tested-by: Mantas Mikulėnas <graw...@gmail.com>
---
 src/shared/dbus-common.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c
index 2769b2c..0e38933 100644
--- a/src/shared/dbus-common.c
+++ b/src/shared/dbus-common.c
@@ -717,9 +717,14 @@ dbus_bool_t bus_maybe_send_reply (DBusConnection   *c,
                                   DBusMessage *message,
                                   DBusMessage *reply)
 {
-        if (dbus_message_get_no_reply (message))
+        /* Some parts of systemd "reply" to signals, which of course
+         * have the no-reply flag set.  We will be defensive here and
+         * still send out a reply if we're passed a signal.
+         */
+        if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL &&
+            dbus_message_get_no_reply(message))
                 return TRUE;
-        return dbus_connection_send (c, reply, NULL);
+        return dbus_connection_send(c, reply, NULL);
 }
 
 DBusHandlerResult bus_send_error_reply(DBusConnection *c, DBusMessage *message, DBusError *berror, int error) {
-- 
1.7.1

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to