Commit 1a2681c4 authored by sebastian's avatar sebastian

ZP-621 #comment revert commit r1958

git-svn-id: https://z-push.org/svn/z-push/trunk@1959 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 19619eb1
......@@ -217,7 +217,7 @@ class LoopDetection extends InterProcessData {
$lookback = self::$start - 600; // look at the last 5 min
foreach ($this->getProcessStack() as $se) {
if ($se['time'] > $lookback && $se['time'] < (self::$start-1)) {
// look for status codes of sync or ping commands
// look for sync command
if (isset($se['stat']) && ($se['cc'] == ZPush::COMMAND_SYNC || $se['cc'] == ZPush::COMMAND_PING)) {
foreach($se['stat'] as $key => $value) {
if (!isset($seenFailed[$key]))
......@@ -229,14 +229,9 @@ class LoopDetection extends InterProcessData {
// look for FolderSync command with previous failed commands
if ($se['cc'] == ZPush::COMMAND_FOLDERSYNC && !empty($seenFailed) && $se['id'] != self::GetProcessIdentifier()) {
// a full folderresync was already triggered
if (isset($se['stat']) && isset($se['stat']['hierarchy']) && ($se['stat']['hierarchy'] == SYNC_FSSTATUS_SYNCKEYERROR || $se['stat']['hierarchy'] == 0)) { // 0 means changes have been exported, see FolderSync happy case
if ($se['stat']['hierarchy'] == SYNC_FSSTATUS_SYNCKEYERROR) {
ZLog::Write(LOGLEVEL_DEBUG, "LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): a full FolderReSync was already requested. Resetting fail counter.");
}
else {
ZLog::Write(LOGLEVEL_DEBUG, "LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): FolderSync did export changes, resetting fail counter.");
}
$seenFailed['hierarchy'] = 0;
if (isset($se['stat']) && isset($se['stat']['hierarchy']) && $se['stat']['hierarchy'] == SYNC_FSSTATUS_SYNCKEYERROR) {
ZLog::Write(LOGLEVEL_DEBUG, "LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): a full FolderReSync was already requested. Resetting fail counter.");
$seenFailed = array();
}
else {
$seenFolderSync = true;
......
......@@ -258,10 +258,6 @@ class FolderSync extends RequestProcessor {
// everything fine, save the sync state for the next time
if ($synckey == $newsynckey)
self::$deviceManager->GetStateManager()->SetSyncState($newsynckey, $newsyncstate);
// Announce that everything is fine and that changes were exported
if ($changeCount > 0)
self::$deviceManager->AnnounceProcessStatus(false, 0);
}
}
self::$encoder->endTag();
......
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