VirtualBox

Changeset 74492 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Sep 27, 2018 11:40:40 AM (6 years ago)
Author:
vboxsync
Message:

DnD/Main: Made sure that the active flag of PRECVDATACTX / PSENDDATACTX is set correctly.

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

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

    r74439 r74492  
    957957    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    958958
     959    GuestDnD *pInst = GuestDnDInst();
     960    if (!pInst)
     961        return VERR_INVALID_POINTER;
     962
     963    GuestDnDResponse *pResp = pCtx->mpResp;
     964    AssertPtr(pCtx->mpResp);
     965
     966    int rc = pCtx->mCBEvent.Reset();
     967    if (RT_FAILURE(rc))
     968        return rc;
     969
    959970    /* Is this context already in receiving state? */
    960971    if (ASMAtomicReadBool(&pCtx->mIsActive))
    961972        return VERR_WRONG_ORDER;
    962973    ASMAtomicWriteBool(&pCtx->mIsActive, true);
    963 
    964     GuestDnD *pInst = GuestDnDInst();
    965     if (!pInst)
    966         return VERR_INVALID_POINTER;
    967 
    968     GuestDnDResponse *pResp = pCtx->mpResp;
    969     AssertPtr(pCtx->mpResp);
    970 
    971     int rc = pCtx->mCBEvent.Reset();
    972     if (RT_FAILURE(rc))
    973         return rc;
    974974
    975975    /*
  • trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp

    r74439 r74492  
    790790    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    791791
    792     int rc;
    793 
     792    /* Is this context already in sending state? */
     793    if (ASMAtomicReadBool(&pCtx->mIsActive))
     794        return VERR_WRONG_ORDER;
    794795    ASMAtomicWriteBool(&pCtx->mIsActive, true);
    795796
     
    807808     *
    808809     ** @todo Support more than one format; add a format<->function handler concept. Later. */
     810    int rc;
    809811    bool fHasURIList = std::find(m_lstFmtOffered.begin(),
    810812                                 m_lstFmtOffered.end(), "text/uri-list") != m_lstFmtOffered.end();
Note: See TracChangeset for help on using the changeset viewer.

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