summaryrefslogtreecommitdiffstats
path: root/desktop/source/app
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-10-27 12:44:40 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-10-27 12:44:40 +0200
commitdc38de4fc110863a5cf2b1c2166efecc6422e5d4 (patch)
tree3add006d7cbb46928c61abb084a2b9d418dc35c1 /desktop/source/app
parentemfio: don't reinvent read_uInt16s_ToOUString (diff)
downloadcore-dc38de4fc110863a5cf2b1c2166efecc6422e5d4.tar.gz
core-dc38de4fc110863a5cf2b1c2166efecc6422e5d4.zip
...and one more fix for DbusIpcThread,
switching back to a "Close" message-to-self without a response (as it had been before dc3ff192f3f048059cf149f416d0b237eb33b014 "Avoid further unwanted interference of DbusIpcThread::execute/close"). Especially on a first start of LO (where it restarts after creating the UserInstallation), it had been observed that DbusIpcThread::close was blocked waiting on a reply in dbus_connection_send_with_reply_and_block while DbusIpcThread::enable had already successfully (i.e., without emitting any of the SAL_WARNs) proceeded past sending the reply and was blocked on closeDone_.wait(). However that can happen---it should be clear by now that I don't understand anything at all about DBus. :( Change-Id: Id5f368a60b2d8dd8b7074308ac1ad6b6545131ff
Diffstat (limited to 'desktop/source/app')
-rw-r--r--desktop/source/app/officeipcthread.cxx27
1 files changed, 4 insertions, 23 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index b14cde421d24..8ad2602fade7 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -570,19 +570,6 @@ void DbusIpcThread::execute()
if (dbus_message_is_method_call(
msg.message, "org.libreoffice.LibreOfficeIpcIfc0", "Close"))
{
- DbusMessageHolder repl(dbus_message_new_method_return(msg.message));
- if (repl.message == nullptr) {
- SAL_WARN(
- "desktop.app", "dbus_message_new_method_return failed");
- } else {
- dbus_uint32_t serial = 0;
- if (!dbus_connection_send(
- connection_.connection, repl.message, &serial)) {
- SAL_WARN("desktop.app", "dbus_connection_send failed");
- } else {
- dbus_connection_flush(connection_.connection);
- }
- }
break;
}
if (!dbus_message_is_method_call(
@@ -681,17 +668,11 @@ void DbusIpcThread::close() {
SAL_WARN("desktop.app", "dbus_message_new_method_call failed");
std::abort();
}
- DbusMessageHolder repl(
- dbus_connection_send_with_reply_and_block(
- con.connection, msg.message, 0x7FFFFFFF, &e));
- assert((repl.message == nullptr) == bool(dbus_error_is_set(&e)));
- if (repl.message == nullptr) {
- SAL_INFO(
- "desktop.app",
- "dbus_connection_send_with_reply_and_block failed with: "
- << e.name << ": " << e.message);
- dbus_error_free(&e);
+ if (!dbus_connection_send(con.connection, msg.message, nullptr)) {
+ SAL_WARN("desktop.app", "dbus_connection_send failed");
+ std::abort();
}
+ dbus_connection_flush(con.connection);
}
closeDone_.set();
}