Commit edb537b7 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1350 Erroneous mapi_last_hresult value when source message is not

found while moving.

Released under the Affero GNU General Public License (AGPL) version 3.
parent ceb36f49
...@@ -570,12 +570,13 @@ class ImportChangesICS implements IImportChanges { ...@@ -570,12 +570,13 @@ class ImportChangesICS implements IImportChanges {
if(!$entryid || !$srcmessage) { if(!$entryid || !$srcmessage) {
$code = SYNC_MOVEITEMSSTATUS_INVALIDSOURCEID; $code = SYNC_MOVEITEMSSTATUS_INVALIDSOURCEID;
$mapiLastHresult = mapi_last_hresult();
// if we move to the trash and the source message is not found, we can also just tell the mobile that we successfully moved to avoid errors (ZP-624) // if we move to the trash and the source message is not found, we can also just tell the mobile that we successfully moved to avoid errors (ZP-624)
if ($newfolder == ZPush::GetBackend()->GetWasteBasket()) { if ($newfolder == ZPush::GetBackend()->GetWasteBasket()) {
$code = SYNC_MOVEITEMSSTATUS_SUCCESS; $code = SYNC_MOVEITEMSSTATUS_SUCCESS;
} }
$errorCase = !$entryid ? "resolve source message id" : "open source message"; $errorCase = !$entryid ? "resolve source message id" : "open source message";
throw new StatusException(sprintf("ImportChangesICS->ImportMessageMove('%s','%s'): Error, unable to %s: 0x%X", $sk, $newfolder, $errorCase, mapi_last_hresult()), $code); throw new StatusException(sprintf("ImportChangesICS->ImportMessageMove('%s','%s'): Error, unable to %s: 0x%X", $sk, $newfolder, $errorCase, $mapiLastHresult), $code);
} }
// check if it is in the synchronization interval and/or shared+private // check if it is in the synchronization interval and/or shared+private
......
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