Kaydet (Commit) dc38de4f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

...and one more fix for DbusIpcThread,

switching back to a "Close" message-to-self without a response (as it had been
before dc3ff192 "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
üst 404208f2
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment