From 4e1f8d2cb8d948fb01e171433f6af829f375f73d Mon Sep 17 00:00:00 2001 From: Manish Narang Date: Thu, 25 Jan 2018 11:39:44 +0000 Subject: [PATCH 1/3] DBusConnection: Pass a pending call around more often If a pending call is provided, _dbus_connection_do_iteration_unlocked checks whether it has completed or has a reply ready as soon as it acquires the I/O path. If that's the case, then the iteration terminates without trying to carry out I/O, so that the pending call can be dispatched immediately, without blocking until a timeout is reached. This change is believed to be necessary, but not sufficient, to resolve #102839. Based on part of a patch from Michael Searle on . Commit message added by Simon McVittie. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102839 Reviewed-by: Simon McVittie --- dbus/dbus-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index 1079e35e..2b0a5507 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -2527,7 +2527,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending) { /* block again, we don't have the reply buffered yet. */ _dbus_connection_do_iteration_unlocked (connection, - NULL, + pending, DBUS_ITERATION_DO_READING | DBUS_ITERATION_BLOCK, timeout_milliseconds - elapsed_milliseconds); -- 2.15.1