[Libreoffice-commits] online.git: tools/Replay.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Fri Feb 10 07:06:10 UTC 2017
tools/Replay.hpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 3831cd016970932c503f0bbec18c7af2537299e5
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Fri Feb 10 01:05:34 2017 -0500
wsd: drop bad sessions when send fails while replaying
Change-Id: I77c2ecd65f20a65e40d78fdc4d7d8ca2b4821270
Reviewed-on: https://gerrit.libreoffice.org/34116
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/tools/Replay.hpp b/tools/Replay.hpp
index 684401f..585a0ce 100644
--- a/tools/Replay.hpp
+++ b/tools/Replay.hpp
@@ -239,7 +239,14 @@ protected:
if (sessionIt != it->second.end())
{
// Send the command.
- sessionIt->second->send(rec.Payload);
+ if (!sessionIt->second->send(rec.Payload))
+ {
+ it->second.erase(sessionIt);
+ }
+ }
+ else
+ {
+ std::cout << "ERROR: Session [" << rec.SessionId << "] does not exist.\n";
}
}
else
@@ -252,6 +259,10 @@ protected:
std::cout << "ERROR: Unknown PID [" << rec.Pid << "] maps to no active document.\n";
}
}
+ else
+ {
+ std::cout << "ERROR: Unknown trace file direction [" << static_cast<char>(rec.Dir) << "].\n";
+ }
epochCurrent = std::chrono::steady_clock::now();
epochFile = rec.TimestampNs;
More information about the Libreoffice-commits
mailing list