bgsave: filter statechanged messages from the bgsave process.

We don't want to send these to coolwsd, they have confusingly
different Modified state from the bgsave process - which is now
unmodified after save.

Really we should filter out almost all messages from the
bgsave process and not forward them.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ifaea028f080e31705256a2d72cf4ab03dfd94187
pull/9055/head
Michael Meeks 2024-05-14 17:49:57 +01:00 committed by Caolán McNamara
parent 8f49f23a03
commit c4b4af5959
1 changed files with 8 additions and 1 deletions

View File

@ -236,9 +236,16 @@ void BgSaveParentWebSocketHandler::handleMessage(const std::vector<char>& data)
// FIXME: check for badness - jsdialogs and so on and bail ... ?
// Should pass only:
// "error:", "asyncsave", "forcedtracevent", "unocommandresult:"
// "error:", "forcedtracevent", "unocommandresult:"
// "statusindicator[start|finish|setvalue]"
// Badly don't want modified state coming from the background processx
if (tokens[1] == "statechanged:")
{
LOG_TRC("Don't send un-wanted message to parent: " << COOLProtocol::getAbbreviatedMessage(data));
return;
}
// Messages already include client-foo prefixes inherited from ourselves
_document->sendFrame(data.data(), data.size(), WSOpCode::Text);