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: Ifaea028f080e31705256a2d72cf4ab03dfd94187pull/9055/head
parent
8f49f23a03
commit
c4b4af5959
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue