Commit 6b66df18 authored by skummer's avatar skummer

ZP-477 #comment normalize window size

git-svn-id: https://z-push.org/svn/z-push/trunk@1792 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 7f7790d1
...@@ -217,7 +217,12 @@ class Sync extends RequestProcessor { ...@@ -217,7 +217,12 @@ class Sync extends RequestProcessor {
} }
if(self::$decoder->getElementStartTag(SYNC_WINDOWSIZE)) { if(self::$decoder->getElementStartTag(SYNC_WINDOWSIZE)) {
$spa->SetWindowSize(self::$decoder->getElementContent()); $ws = self::$decoder->getElementContent();
// normalize windowsize - see ZP-477
if ($ws == 0 || $ws > 512)
$ws = 512;
$spa->SetWindowSize($ws);
// also announce the currently requested window size to the DeviceManager // also announce the currently requested window size to the DeviceManager
self::$deviceManager->SetWindowSize($spa->GetFolderId(), $spa->GetWindowSize()); self::$deviceManager->SetWindowSize($spa->GetFolderId(), $spa->GetWindowSize());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment