VirtualBox

Ignore:
Timestamp:
May 25, 2023 11:10:14 AM (21 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157634
Message:

Shared Clipboard/HostService: Fixes for (not) reporting (and starting) transfers with older Guest Additions. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r99968 r99974  
    14451445
    14461446#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    1447     /*
    1448      * If transfer mode is set to disabled, don't report the URI list format to the guest.
    1449      */
     1447    bool fSkipTransfers = false;
    14501448    if (!(g_fTransferMode & VBOX_SHCL_TRANSFER_MODE_F_ENABLED))
    14511449    {
     1450        LogRel2(("Shared Clipboard: File transfers are disabled, skipping reporting those to the guest\n"));
     1451        fSkipTransfers = true;
     1452    }
     1453    else if (!(pClient->State.fGuestFeatures0 & VBOX_SHCL_GF_0_TRANSFERS))
     1454    {
     1455        LogRel2(("Shared Clipboard: File transfers not supported by installed Guest Addtions, skipping reporting those to the guest\n"));
     1456        fSkipTransfers = true;
     1457    }
     1458
     1459    if (fSkipTransfers)
    14521460        fFormats &= ~VBOX_SHCL_FMT_URI_LIST;
    1453         LogRel2(("Shared Clipboard: File transfers are disabled, skipping reporting those to the guest\n"));
    1454     }
    14551461#endif
    14561462
     
    14771483
    14781484#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    1479         /* If we announce an URI list, create a transfer locally and also tell the guest to create
    1480          * a transfer on the guest side. */
    1481         if (fFormats & VBOX_SHCL_FMT_URI_LIST)
     1485        /* Create a transfer locally and also tell the guest to create a transfer on the guest side. */
     1486        if (!fSkipTransfers)
    14821487        {
    14831488            rc = shClSvcTransferStart(pClient, SHCLTRANSFERDIR_TO_REMOTE, SHCLSOURCE_LOCAL,
     
    14911496        else
    14921497#endif
    1493         {
    14941498            rc = VINF_SUCCESS;
    1495         }
    14961499    }
    14971500    else
     
    22102213
    22112214                shClSvcClientLock(pClient);
     2215
     2216                /* Reset message queue. */
     2217                shClSvcMsgQueueReset(pClient);
    22122218
    22132219#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
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