DBusConnection: Pass a pending call around more often
authorManish Narang <Manish.Narang@kpit.com>
Thu, 25 Jan 2018 11:39:44 +0000 (11:39 +0000)
committerSimon McVittie <smcv@collabora.com>
Tue, 6 Feb 2018 19:14:27 +0000 (19:14 +0000)
commit1572ca928b466031c9822c1083b7bc6ce63b27c6
tree713bc1c28f85af4fb78efb1947621a92c54e4885
parent47ab11cb42152563017e4a5ca47cc21963781e75
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
<https://bugs.freedesktop.org/show_bug.cgi?id=102839>.
Commit message added by Simon McVittie.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102839
Reviewed-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 30f8a38b3c8f8756744d6b65dd8207302a683acc)
dbus/dbus-connection.c