lib/ext

Aleksander Machniak machniak at kolabsys.com
Mon Aug 18 10:25:49 CEST 2014


 lib/ext/Syncroton/Command/Sync.php |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 3ea93d21dc237412fe0188b185d5c71becab545a
Author: Aleksander Machniak <alec at alec.pl>
Date:   Mon Aug 18 10:25:26 2014 +0200

    Fix handling of WindowSize=0 (#3050)

diff --git a/lib/ext/Syncroton/Command/Sync.php b/lib/ext/Syncroton/Command/Sync.php
index 339808b..3a3bc26 100644
--- a/lib/ext/Syncroton/Command/Sync.php
+++ b/lib/ext/Syncroton/Command/Sync.php
@@ -131,7 +131,11 @@ class Syncroton_Command_Sync extends Syncroton_Command_Wbxml
         }
         
         $this->_globalWindowSize = isset($requestXML->WindowSize) ? (int)$requestXML->WindowSize : 100;
-        
+
+        if (!$this->_globalWindowSize || $this->_globalWindowSize > 512) {
+            $this->_globalWindowSize = 512;
+        }
+
         if ($this->_globalWindowSize > $this->_maxWindowSize) {
             $this->_globalWindowSize = $this->_maxWindowSize;
         }




More information about the commits mailing list