VirtualBox

Changeset 85021 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Jul 1, 2020 11:42:30 AM (5 years ago)
Author:
vboxsync
Message:

DnD/HGCM: A bit of work on the protocol version code; don't use guest properties to figure out what protocol to use and rather ask the host service what it supports instead. This also needs proper feature flags support next.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.cpp

    r82968 r85021  
    489489                        rc = HGCMSvcGetU32(&paParms[idxProto + 1], &data.uFlags);
    490490                    if (RT_SUCCESS(rc))
     491                    {
     492                        unsigned uProtocolVer = 3; /* The protocol version we're going to use. */
     493
     494                        /* Make sure we're only setting a protocl version we're supporting on the host. */
     495                        if (data.uProtocol > uProtocolVer)
     496                            data.uProtocol = uProtocolVer;
     497
    491498                        pClient->SetProtocolVer(data.uProtocol);
    492                     if (RT_SUCCESS(rc))
    493                     {
     499
     500                        /* Return the highest protocol version we're supporting. */
     501                        paParms[idxProto].u.uint32 = data.uProtocol;
     502
    494503                        LogFlowFunc(("Client %RU32 is now using protocol v%RU32\n", pClient->GetClientID(), pClient->GetProtocolVer()));
    495504                        DO_HOST_CALLBACK();
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