Skip to content

Commit

Permalink
Fix calculation of when to send MOREAVAILABLE tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 17, 2016
1 parent fa2c591 commit 5fc9495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/ActiveSync/lib/Horde/ActiveSync/Request/Sync.php
Expand Up @@ -496,12 +496,12 @@ protected function _handle()
: $collection['windowsize'];

if (!empty($changecount) &&
(($changecount > $max_windowsize) || $cnt_global + $max_windowsize > $this->_collections->getDefaultWindowSize())) {
(($changecount > $max_windowsize) || $cnt_global + $changecount > $this->_collections->getDefaultWindowSize())) {
$this->_logger->info(sprintf(
'[%s] Sending MOREAVAILABLE. WINDOWSIZE = %d, $changecount = %d, MAX_REQUEST_WINDOWSIZE = %d, $cnt_global = %d',
$this->_procid, $max_windowsize, $changecount, $this->_collections->getDefaultWindowSize(), $cnt_global));
$this->_encoder->startTag(Horde_ActiveSync::SYNC_MOREAVAILABLE, false, true);
$over_window = ($cnt_global + $max_windowsize > $this->_collections->getDefaultWindowSize());
$over_window = ($cnt_global + $changecount > $this->_collections->getDefaultWindowSize());
}

if (!empty($changecount)) {
Expand Down

0 comments on commit 5fc9495

Please sign in to comment.