diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-10-27 12:44:40 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-10-27 15:12:05 +0200 |
commit | 49562e70b72d340ce9794b2a29be1c9bef51b946 (patch) | |
tree | 713cfee71a97a6ddbf4f53926a4435ce1f836ce8 /desktop | |
parent | 3ddbaa4132204cb4b6e92e9db6fff8e849dec4d6 (diff) |
...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
(cherry picked from commit dc38de4fc110863a5cf2b1c2166efecc6422e5d4)
Reviewed-on: https://gerrit.libreoffice.org/43941
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 6b797d49aa57..9a944865ef29 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -573,19 +573,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( @@ -684,17 +671,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(); } |