VirtualBox

Changeset 55823 in vbox


Ignore:
Timestamp:
May 12, 2015 11:46:09 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
100264
Message:

DnD: Main/GuestDnDSourceImpl.cpp: Don't route reported guest errors back to the guest, logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp

    r55706 r55823  
    305305        return setError(E_INVALIDARG, tr("Another drop operation already is in progress"));
    306306
     307    /* Gets reset when the thread is finished. */
    307308    ASMAtomicWriteBool(&mDataBase.mfTransferIsPending, true);
    308309
     
    324325        RecvDataTask *pTask = new RecvDataTask(this, &mData.mRecvCtx);
    325326        AssertReturn(pTask->isOk(), pTask->getRC());
     327       
     328        LogFlowFunc(("Starting thread ...\n"));
    326329
    327330        int rc = RTThreadCreate(NULL, GuestDnDSource::i_receiveDataThread,
     
    786789    ASMAtomicWriteBool(&pSource->mDataBase.mfTransferIsPending, false);
    787790
    788     LogFlowFunc(("pSource=%p returning rc=%Rrc\n", (GuestDnDSource *)pSource, rc));
    789 
    790791    if (pTask)
    791792        delete pTask;
     793
     794    LogFlowFunc(("pSource=%p returning rc=%Rrc\n", (GuestDnDSource *)pSource, rc));
    792795    return rc;
    793796}
     
    10221025
    10231026    int rc = VINF_SUCCESS;
     1027
     1028    int rcCallback = VINF_SUCCESS; /* rc for the callback. */
    10241029    bool fNotify = false;
    10251030
     
    10921097
    10931098            pCtx->mpResp->reset();
     1099            if (RT_SUCCESS(pCBData->rc))
     1100                pCBData->rc = VERR_GENERAL_FAILURE; /* Make sure some error is set. */
    10941101            rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_ERROR, pCBData->rc);
    10951102            if (RT_SUCCESS(rc))
    1096                 rc = pCBData->rc;
     1103                rcCallback = pCBData->rc;
    10971104            break;
    10981105        }
     
    11031110    }
    11041111
    1105     if (RT_FAILURE(rc))
     1112    if (   RT_FAILURE(rc)
     1113        || RT_FAILURE(rcCallback))
     1114    {
    11061115        fNotify = true;
     1116        if (RT_SUCCESS(rcCallback))
     1117            rcCallback = rc;
     1118    }
    11071119
    11081120    /* All URI data processed? */
     
    11131125    }
    11141126
    1115     LogFlowFunc(("cbProcessed=%RU64, cbToProcess=%RU64, fNotify=%RTbool, rc=%Rrc\n",
    1116                  pCtx->mData.cbProcessed, pCtx->mData.cbToProcess, fNotify, rc));
     1127    LogFlowFunc(("cbProcessed=%RU64, cbToProcess=%RU64, fNotify=%RTbool, rcCallback=%Rrc, rc=%Rrc\n",
     1128                 pCtx->mData.cbProcessed, pCtx->mData.cbToProcess, fNotify, rcCallback, rc));
    11171129
    11181130    if (fNotify)
    11191131    {
    1120         int rc2 = pCtx->mCallback.Notify(rc);
     1132        int rc2 = pCtx->mCallback.Notify(rcCallback);
    11211133        AssertRC(rc2);
    11221134    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette