[Libreoffice-commits] core.git: desktop/source

Stephan Bergmann sbergman at redhat.com
Fri Oct 27 10:50:19 UTC 2017


 desktop/source/app/officeipcthread.cxx |   27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)

New commits:
commit dc38de4fc110863a5cf2b1c2166efecc6422e5d4
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Oct 27 12:44:40 2017 +0200

    ...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

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();
 }


More information about the Libreoffice-commits mailing list