[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - net/clientnb.cpp

Michael Meeks michael.meeks at collabora.com
Fri Feb 24 22:19:12 UTC 2017


 net/clientnb.cpp |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit cb76f20350f83f706e8d83741e4acb4817ab2800
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Feb 24 22:18:38 2017 +0000

    Use pseudo-random-ness in test to make strace cleaner.

diff --git a/net/clientnb.cpp b/net/clientnb.cpp
index 0f7c796..311491e 100644
--- a/net/clientnb.cpp
+++ b/net/clientnb.cpp
@@ -222,9 +222,13 @@ struct Client : public Poco::Util::Application
         std::shared_ptr<WebSocket> ws = session.getWebSocket();
 
         std::vector<char> res;
+
+        std::srand(std::time(0));
+
+        std::vector<char> data;
         for (size_t i = 1; i < (1 << 14); ++i)
         {
-            const std::vector<char> data = Util::rng::getBytes(i);
+            data.push_back((char)(std::rand() / (RAND_MAX/256)));
             ws->sendFrame(data.data(), data.size(), WebSocket::SendFlags::FRAME_BINARY);
 
             res.resize(i);


More information about the Libreoffice-commits mailing list