Uploaded image for project: 'Z-Push'
  1. Z-Push
  2. ZP-1350

Erroneous mapi_last_hresult value when source message is not found while moving

    Details

    • Type: Bug
    • Status: QA
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.3.8
    • Fix Version/s: 2.4.0 beta2, 2.4.0
    • Component/s: None
    • Labels:
      None

      Description

      The mapi_last_hresult() in the StatusException output comes from GetWasteBasket() which is called after opening the source message failed.

              if ($entryid) {
                  //open the source message
                  $srcmessage = mapi_msgstore_openentry($this->store, $entryid);
              }
      
              if(!$entryid || !$srcmessage) {
                  $code = SYNC_MOVEITEMSSTATUS_INVALIDSOURCEID;
                  // 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()) {
                      $code = SYNC_MOVEITEMSSTATUS_SUCCESS;
                  }
                  $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);
              }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Manfred Manfred Kutas
                Reporter:
                Manfred Manfred Kutas
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: