VirtualBox

Ignore:
Timestamp:
Feb 8, 2021 3:57:38 PM (4 years ago)
Author:
vboxsync
Message:

Shared Clipboard/Transfers: Cleaned up guest feature flag handling in VbglR3ClipboardConnectEx().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp

    r87611 r87640  
    9999     */
    100100    pCtx->idClient              = 0;
     101    pCtx->fGuestFeatures        = fGuestFeatures;
    101102    pCtx->fHostFeatures         = 0;
    102103    pCtx->fGuestFeatures        = VBOX_SHCL_GF_NONE;
     
    107108#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    108109    /* Indicate that this guest supports Shared Clipboard file transfers. */
    109     pCtx->fGuestFeatures       |= VBOX_SHCL_GF_0_TRANSFERS;
     110    pCtx->fGuestFeatures |= VBOX_SHCL_GF_0_TRANSFERS;
    110111# ifdef RT_OS_WINDOWS
    111112    /* Indicate that on Windows guest OSes we have our own IDataObject implementation which
    112113     * integrates nicely into the guest's Windows Explorer showing / handling the Shared Clipboard file transfers. */
    113     pCtx->fGuestFeatures       |= VBOX_SHCL_GF_0_TRANSFERS_FRONTEND;
     114    pCtx->fGuestFeatures |= VBOX_SHCL_GF_0_TRANSFERS_FRONTEND;
    114115# endif
    115116    pCtx->Transfers.cbChunkSize    = VBOX_SHCL_DEFAULT_CHUNK_SIZE; /** @todo Make this configurable. */
     
    126127         * Next is reporting our features.  If this fails, assume older host.
    127128         */
    128         rc = VbglR3ClipboardReportFeatures(pCtx->idClient, fGuestFeatures, &pCtx->fHostFeatures);
     129        rc = VbglR3ClipboardReportFeatures(pCtx->idClient, pCtx->fGuestFeatures, &pCtx->fHostFeatures);
    129130        if (RT_SUCCESS(rc))
    130131        {
    131             pCtx->fGuestFeatures = fGuestFeatures;
    132 
    133132            LogRel2(("Shared Clipboard: Guest features: %#RX64 - Host features: %#RX64\n",
    134133                     pCtx->fGuestFeatures, pCtx->fHostFeatures));
     
    22262225                    {
    22272226                        uint32_t cbRead;
    2228                         rc = ShClTransferObjRead(pTransfer, hObj, pvBuf, cbToRead, &cbRead, fFlags);
     2227                        rc = ShClTransferObjRead(pTransfer, hObj, pvBuf, cbToRead, fFlags, &cbRead);
    22292228                        if (RT_SUCCESS(rc))
    22302229                            rc = VbglR3ClipboardObjWriteSend(pCmdCtx, hObj, pvBuf, cbRead, NULL /* pcbWritten */);
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