Commit c492e99a authored by skummer's avatar skummer

ZP-291 #comment fixed typo in loadstatus and make sure that loadstatus is not...

ZP-291 #comment fixed typo in loadstatus and make sure that loadstatus is not overwritten if a previous state loading failed #time 30m

git-svn-id: https://z-push.org/svn/z-push/trunk@1531 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent cb5c8635
...@@ -569,14 +569,16 @@ class Sync extends RequestProcessor { ...@@ -569,14 +569,16 @@ class Sync extends RequestProcessor {
$sc->SetLifetime($hbinterval); $sc->SetLifetime($hbinterval);
// states are lazy loaded - we have to make sure that they are there! // states are lazy loaded - we have to make sure that they are there!
$loadstatus = SYNC_STATUS_SUCCESS;
foreach($sc as $folderid => $spa) { foreach($sc as $folderid => $spa) {
$fad = array(); $fad = array();
// if loading the states fails, we do not enter heartbeat, but we keep $status on SYNC_STATUS_SUCCESS // if loading the states fails, we do not enter heartbeat, but we keep $status on SYNC_STATUS_SUCCESS
// so when the changes are exported the correct folder gets an SYNC_STATUS_INVALIDSYNCKEY // so when the changes are exported the correct folder gets an SYNC_STATUS_INVALIDSYNCKEY
$loadstatus = $this->loadStates($sc, $spa, $fad); if ($loadstatus == SYNC_STATUS_SUCCESS)
$loadstatus = $this->loadStates($sc, $spa, $fad);
} }
if ($loadstatus = SYNC_STATUS_SUCCESS) { if ($loadstatus == SYNC_STATUS_SUCCESS) {
$foundchanges = false; $foundchanges = false;
// wait for changes // wait for changes
......
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