Add more tolerance for chunked packages

This commit is contained in:
Jörg Lehrke 2010-05-14 13:06:08 +00:00
parent 5623866894
commit 11093e933c
2 changed files with 4 additions and 6 deletions

View File

@ -212,9 +212,8 @@ class Horde_SyncML_Sync {
$contentSize = strlen($syncItem->_content);
if ((($size = $syncItem->getContentSize()) !== false) &&
($contentSize != $size) &&
($contentSize + 1 != $size)) {
Horde::logMessage('SyncML: content size missmatch for LocURI '
abs($contentSize - $size) > 3) {
Horde::logMessage('SyncML: content size mismatch for LocURI '
. $syncItem->getLocURI() . ": $contentSize ($size)",
__FILE__, __LINE__, PEAR_LOG_ERROR);
$command->setStatus(RESPONSE_SIZE_MISMATCH);

View File

@ -225,9 +225,8 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
$contentSize = strlen($syncItem->_content);
if ((($size = $syncItem->getContentSize()) !== false) &&
($contentSize != $size) &&
($contentSize + 1 != $size)) {
Horde::logMessage('SyncML: content size missmatch for LocURI ' . $syncItem->_luid .
abs($contentSize - $size) > 3) {
Horde::logMessage('SyncML: content size mismatch for LocURI ' . $syncItem->_luid .
": $contentSize ($size)", __FILE__, __LINE__, PEAR_LOG_ERROR);
$command->setStatus(RESPONSE_SIZE_MISMATCH);
return;