[Libreoffice-commits] online.git: common/IoUtil.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue Nov 29 02:42:28 UTC 2016
common/IoUtil.cpp | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 21b1287444fc483adb8561243497ef466cd53fa9
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon Nov 28 21:38:34 2016 -0500
Revert "IoUtil: remove never read write of 'n'"
Setting 'n = -1;' helps to detect where the failure happened
when receiveFrame throws. At the bottom of the function we log
partially processed data by checking n (among others).
This reverts commit 752372a2b022ad4a450df61bcc58c978840b9b37.
Change-Id: I3294329c3d95b38d72c3fc824ab2eb7f2339adee
Reviewed-on: https://gerrit.libreoffice.org/31339
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp
index 2ee9c84..6fea0b4 100644
--- a/common/IoUtil.cpp
+++ b/common/IoUtil.cpp
@@ -79,6 +79,7 @@ void SocketProcessor(const std::shared_ptr<LOOLWebSocket>& ws,
try
{
payload.resize(payload.capacity());
+ n = -1; // In case receiveFrame throws we log dropped data.
n = ws->receiveFrame(payload.data(), payload.size(), flags);
payload.resize(std::max(n, 0));
}
More information about the Libreoffice-commits
mailing list