VirtualBox

Ignore:
Timestamp:
Jun 29, 2009 1:52:08 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49250
Message:

HostServices/SharedClipboard: handle the "no data from guest" case correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp

    r20551 r21024  
    310310    Assert(pCtx->pReq == NULL);
    311311    RTCritSectLeave(&pCtx->clipboardMutex);
     312    if (RT_SUCCESS(rc) && (pReq->pv == NULL))
     313        rc = VERR_NO_DATA;
    312314    LogFlowFunc(("returning %Rrc\n", rc));
    313315    return rc;
     
    584586    if (rc != VERR_TIMEOUT)
    585587    {
    586         RTPrintf("rc=%Rrc\n", rc);
     588        RTPrintf("rc=%Rrc, expected VERR_TIMEOUT\n", rc);
     589        ++cErrors;
     590    }
     591    pBackend->writeData.pv = NULL;
     592    pBackend->writeData.cb = 0;
     593    pBackend->writeData.timeout = false;
     594    rc = ClipRequestDataForX11(client.pCtx, 23, &pv, &cb);
     595    if (rc != VERR_NO_DATA)
     596    {
     597        RTPrintf("rc=%Rrc, expected VERR_NO_DATA\n", rc);
    587598        ++cErrors;
    588599    }
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