Commit 1ed71ec2 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #191 in ZP/z-push from...

Merge pull request #191 in ZP/z-push from bugfix/ZP-872-ping-doesn-t-catch-all-notifications to develop

* commit '94c04253':
  ZP-872 BackendZarafa->adviseStoreToSink() sometimes advised wrong store.
parent e45b2627
......@@ -1263,15 +1263,16 @@ class BackendZarafa implements IBackend, ISearchProvider {
private function adviseStoreToSink($store) {
// check if we already advised the store
if (!in_array($store, $this->changesSinkStores)) {
mapi_msgstore_advise($this->store, null, fnevObjectModified | fnevObjectCreated | fnevObjectMoved | fnevObjectDeleted, $this->changesSink);
$this->changesSinkStores[] = $store;
mapi_msgstore_advise($store, null, fnevObjectModified | fnevObjectCreated | fnevObjectMoved | fnevObjectDeleted, $this->changesSink);
if (mapi_last_hresult()) {
ZLog::Write(LOGLEVEL_WARN, sprintf("ZarafaBackend->adviseStoreToSink(): failed to advised store '%s' with code 0x%X. Polling will be performed.", $this->store, mapi_last_hresult()));
ZLog::Write(LOGLEVEL_WARN, sprintf("ZarafaBackend->adviseStoreToSink(): failed to advised store '%s' with code 0x%X. Polling will be performed.", $store, mapi_last_hresult()));
return false;
}
else
ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZarafaBackend->adviseStoreToSink(): advised store '%s'", $this->store));
else {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZarafaBackend->adviseStoreToSink(): advised store '%s'", $store));
$this->changesSinkStores[] = $store;
}
}
return true;
}
......@@ -1964,4 +1965,4 @@ class BackendZarafa implements IBackend, ISearchProvider {
*/
class BackendICS extends BackendZarafa {}
?>
\ No newline at end of file
?>
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