[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-9' - 4 commits - loleaflet/Makefile loolwsd/Common.hpp loolwsd/configure.ac loolwsd/debian loolwsd/LOOLWebSocket.hpp

Andras Timar andras.timar at collabora.com
Mon Nov 28 16:03:56 UTC 2016


 loleaflet/Makefile        |    2 +-
 loolwsd/Common.hpp        |    2 --
 loolwsd/LOOLWebSocket.hpp |   12 ++++++------
 loolwsd/configure.ac      |    2 +-
 loolwsd/debian/changelog  |    2 +-
 5 files changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 81ad63b8dee5ea533d3c65c7bb9ec736844f4a0f
Author: Andras Timar <andras.timar at collabora.com>
Date:   Mon Nov 28 17:03:33 2016 +0100

    Bump version to 1.9.10

diff --git a/loleaflet/Makefile b/loleaflet/Makefile
index 4304d1b..fddb365 100644
--- a/loleaflet/Makefile
+++ b/loleaflet/Makefile
@@ -3,7 +3,7 @@
 # ("micro") part: Between releases odd, even for releases (no other
 # changes inbetween).
 
-VERSION=1.9.9
+VERSION=1.9.10
 
 # Version number of the bundled 'draw' thing
 DRAW_VERSION=0.2.4
diff --git a/loolwsd/configure.ac b/loolwsd/configure.ac
index 0cb2402..6a79bf0 100644
--- a/loolwsd/configure.ac
+++ b/loolwsd/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.69])
 
-AC_INIT([loolwsd], [1.9.9], [libreoffice at lists.freedesktop.org])
+AC_INIT([loolwsd], [1.9.10], [libreoffice at lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.11 silent-rules subdir-objects])
diff --git a/loolwsd/debian/changelog b/loolwsd/debian/changelog
index 5887ec4..6b5940f 100644
--- a/loolwsd/debian/changelog
+++ b/loolwsd/debian/changelog
@@ -1,4 +1,4 @@
-loolwsd (1.9.9-1) unstable; urgency=medium
+loolwsd (1.9.10-1) unstable; urgency=medium
 
   * see the git log: http://col.la/cool2
 
commit 4f5bc1ea662442ced36d4c7840177a522b86ff4a
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Nov 28 11:33:20 2016 +0100

    These constants are not needed any more.
    
    Change-Id: I5e73d4eacdf5e88f11bc3755162fe601a65417fe
    (cherry picked from commit e15ec1d33b6da6cbf5b66f1ebcfc63fd4c167d80)

diff --git a/loolwsd/Common.hpp b/loolwsd/Common.hpp
index 0223be8..814ab59 100644
--- a/loolwsd/Common.hpp
+++ b/loolwsd/Common.hpp
@@ -22,8 +22,6 @@ constexpr long CHILD_TIMEOUT_MS = COMMAND_TIMEOUT_MS;
 constexpr int CHILD_REBALANCE_INTERVAL_MS = CHILD_TIMEOUT_MS / 10;
 constexpr int POLL_TIMEOUT_MS = COMMAND_TIMEOUT_MS / 10;
 constexpr int WS_SEND_TIMEOUT_MS = 1000;
-constexpr int WS_DELAY_MS = 10;
-constexpr int WS_JITTER_MS = 5;
 
 /// Pipe and Socket read buffer size.
 /// Should be large enough for ethernet packets
commit 3d7da86e85c0dda0c60daab278c804ddbdb1fc05
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Nov 28 11:26:41 2016 +0100

    Make sure we don't use the jitter / delay in production builds.
    
    And default to 0 even for debug; who wants to use that for debugging, they
    know what to do.
    
    Change-Id: I23dd0c5f806b2b31a883b7a2b8d822ea8c0bb6c5
    (cherry picked from commit 9842f3239ff08583d74c9a835937a6ea781e570c)

diff --git a/loolwsd/LOOLWebSocket.hpp b/loolwsd/LOOLWebSocket.hpp
index e10af2a..6aa4020 100644
--- a/loolwsd/LOOLWebSocket.hpp
+++ b/loolwsd/LOOLWebSocket.hpp
@@ -31,11 +31,11 @@ class LOOLWebSocket : public Poco::Net::WebSocket
 private:
     std::mutex _mutex;
 
-#ifdef ENABLE_DEBUG
+#if ENABLE_DEBUG
     std::chrono::milliseconds getWebSocketDelay()
     {
-        unsigned long baseDelay = WS_DELAY_MS;
-        unsigned long jitter = WS_JITTER_MS;
+        unsigned long baseDelay = 0;
+        unsigned long jitter = 0;
         if (std::getenv("LOOL_WS_DELAY"))
         {
             baseDelay = std::stoul(std::getenv("LOOL_WS_DELAY"));
@@ -81,7 +81,7 @@ public:
     /// Should we also factor out the handling of non-final and continuation frames into this?
     int receiveFrame(char* buffer, const int length, int& flags)
     {
-#ifdef ENABLE_DEBUG
+#if ENABLE_DEBUG
         // Delay receiving the frame
         std::this_thread::sleep_for(getWebSocketDelay());
 #endif
@@ -111,7 +111,7 @@ public:
     /// Wrapper for Poco::Net::WebSocket::sendFrame() that handles large frames.
     int sendFrame(const char* buffer, const int length, const int flags = FRAME_TEXT)
     {
-#ifdef ENABLE_DEBUG
+#if ENABLE_DEBUG
         // Delay sending the frame
         std::this_thread::sleep_for(getWebSocketDelay());
 #endif
commit c7f41580d2cdacf76f8ca5f7e9d82f37aee376a1
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Nov 24 15:08:00 2016 +0530

    loolwsd: Handle zero jitter
    
    While some value of jitter is default in debug builds, one should
    easily be able to disable this latency stuff using env. variables
    LOOL_WS_DELAY=0 LOOL_WS_JITTER=0
    
    Change-Id: I345df8f48adc69b5f237f18c981172441d21c757
    (cherry picked from commit 33393a4254e605a46b9f866306a84935fdf0619e)

diff --git a/loolwsd/LOOLWebSocket.hpp b/loolwsd/LOOLWebSocket.hpp
index d78f625..e10af2a 100644
--- a/loolwsd/LOOLWebSocket.hpp
+++ b/loolwsd/LOOLWebSocket.hpp
@@ -45,7 +45,7 @@ private:
             jitter = std::stoul(std::getenv("LOOL_WS_JITTER"));
         }
 
-        return std::chrono::milliseconds(baseDelay + (std::rand() % jitter));
+        return std::chrono::milliseconds(baseDelay + (jitter > 0 ? (std::rand() % jitter) : 0));
     }
 #endif
 


More information about the Libreoffice-commits mailing list