summaryrefslogtreecommitdiffstats
path: root/tqdbusconnection.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2021-12-08 14:42:21 +0900
committerMichele Calgaro <[email protected]>2021-12-08 19:23:43 +0900
commita5488007501c78afcbfaff5bb6e48fec85afebe8 (patch)
treefaf8146bfeabeab5a6301317c65203f3387a1c38 /tqdbusconnection.cpp
parentfb8b28ec7dc78e2b8c6fc3e3c3e5f3d7a1984b06 (diff)
downloaddbus-1-tqt-a5488007501c78afcbfaff5bb6e48fec85afebe8.tar.gz
dbus-1-tqt-a5488007501c78afcbfaff5bb6e48fec85afebe8.zip
Make sure to handle pending messages at start up if a dbus service
is invoked by the dbus daemon. Prior to this fix, when a service was started by the dbus daemon, the first dbus call sent to it was being held back till the next dbus call was performed, resulting in a long timeout for the first unhandled call and a delayed answer. Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 96f7e609085b019989a3f7a613fbd05f629793bd)
Diffstat (limited to 'tqdbusconnection.cpp')
-rw-r--r--tqdbusconnection.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tqdbusconnection.cpp b/tqdbusconnection.cpp
index 0360456..7ad47a6 100644
--- a/tqdbusconnection.cpp
+++ b/tqdbusconnection.cpp
@@ -401,8 +401,9 @@ bool TQT_DBusConnection::requestName(const TQString &name, int modeFlags)
dbusFlags |= DBUS_NAME_FLAG_REPLACE_EXISTING;
dbus_bus_request_name(d->connection, name.utf8(), dbusFlags, &d->error);
-
- return !d->handleError();
+ bool res = !d->handleError();
+ res &= d->handleUnreadMessages();
+ return res;
}
#include "tqdbusconnection.moc"