summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils-jbus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils-jbus.c b/src/utils-jbus.c
index 7000009..67e3ce4 100644
--- a/src/utils-jbus.c
+++ b/src/utils-jbus.c
@@ -669,6 +669,7 @@ int jbus_dispatch_multiple(struct jbus **jbuses, int njbuses, int maxcount)
for (i = r = 0 ; i < njbuses && r < maxcount ; i++) {
dbus_connection_read_write(jbuses[i]->connection, 0);
+ sts = dbus_connection_get_dispatch_status(jbuses[i]->connection);
while(sts == DBUS_DISPATCH_DATA_REMAINS && r < maxcount) {
sts = dbus_connection_dispatch(jbuses[i]->connection);
r++;
@@ -690,6 +691,8 @@ int jbus_read_write_dispatch_multiple(struct jbus **jbuses, int njbuses, int tom
assert(fds != NULL);
r = jbus_dispatch_multiple(jbuses, njbuses, maxcount);
+ if (r)
+ return r;
n = jbus_fill_pollfds(jbuses, njbuses, fds);
for(;;) {
s = poll(fds, n, toms);