summaryrefslogtreecommitdiff
path: root/bus/connection.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-10-29 14:10:48 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-10-29 14:10:48 +0000
commitf541722f5ac0b2ee2d9eab6b9a77aa1f1c174817 (patch)
tree86edaf8e53665e1dbe8fad8c919bdb1eccb29ded /bus/connection.c
parentdab9cbc5026d896f5ec15a3c5ff69ed18854c7e2 (diff)
downloaddbus-f541722f5ac0b2ee2d9eab6b9a77aa1f1c174817.tar.gz
Use a better NoReply message for disconnection with reply pending
As an implementation detail, dbus-daemon handles this situation by artificially triggering a timeout (even if its configured timeout for method calls is in fact infinite). However, using the same debug message for both is misleading, and can lead people who are debugging a service crash to blame dbus-daemon instead, wasting their time. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=76112
Diffstat (limited to 'bus/connection.c')
-rw-r--r--bus/connection.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bus/connection.c b/bus/connection.c
index 519122c5..0df8a3a8 100644
--- a/bus/connection.c
+++ b/bus/connection.c
@@ -1619,7 +1619,12 @@ bus_pending_reply_send_no_reply (BusConnections *connections,
DBUS_ERROR_NO_REPLY))
goto out;
- errmsg = "Message did not receive a reply (timeout by message bus)";
+ /* If you change these messages, adjust test/dbus-daemon.c to match */
+ if (pending->will_send_reply == NULL)
+ errmsg = "Message recipient disconnected from message bus without replying";
+ else
+ errmsg = "Message did not receive a reply (timeout by message bus)";
+
dbus_message_iter_init_append (message, &iter);
if (!dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &errmsg))
goto out;