summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-18 08:25:26 (GMT)
committerAleksander Machniak <alec@alec.pl>2014-08-18 08:25:26 (GMT)
commit3ea93d21dc237412fe0188b185d5c71becab545a (patch)
treeb50095b67850210d31cc0432f79538cf1fb5d427
parent7c99012edb904e79b1049208596a6639812939f3 (diff)
downloadkolab-syncroton-3ea93d21dc237412fe0188b185d5c71becab545a.tar.gz
Fix handling of WindowSize=0 (#3050)
-rw-r--r--lib/ext/Syncroton/Command/Sync.php6
1 files changed, 5 insertions, 1 deletions
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;
}