VirtualBox

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


Ignore:
Timestamp:
Dec 22, 2017 4:53:41 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119922
Message:

USB: When capturing devices, provide the speed rather than USB port version, since the speed provides a superset of the information (bugref:7280).

File:
1 edited

Legend:

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

    r70063 r70322  
    89228922    }
    89238923
    8924     USHORT portVersion = 0;
    8925     hrc = aHostDevice->COMGETTER(PortVersion)(&portVersion);
     8924    USBConnectionSpeed_T enmSpeed;
     8925    hrc = aHostDevice->COMGETTER(Speed)(&enmSpeed);
    89268926    AssertComRCReturnRC(hrc);
    8927     Assert(portVersion == 1 || portVersion == 2 || portVersion == 3);
    89288927
    89298928    int vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), 0 /* idDstCpu (saved state, see #6232) */,
    89308929                               (PFNRT)i_usbAttachCallback, 10,
    89318930                               this, ptrVM.rawUVM(), aHostDevice, uuid.raw(), Backend.c_str(),
    8932                                Address.c_str(), pvRemoteBackend, portVersion, aMaskedIfs,
     8931                               Address.c_str(), pvRemoteBackend, enmSpeed, aMaskedIfs,
    89338932                               aCaptureFilename.isEmpty() ? NULL : aCaptureFilename.c_str());
    89348933    if (RT_SUCCESS(vrc))
     
    89818980DECLCALLBACK(int)
    89828981Console::i_usbAttachCallback(Console *that, PUVM pUVM, IUSBDevice *aHostDevice, PCRTUUID aUuid, const char *pszBackend,
    8983                              const char *aAddress, void *pvRemoteBackend, USHORT aPortVersion, ULONG aMaskedIfs,
     8982                             const char *aAddress, void *pvRemoteBackend, USBConnectionSpeed_T aEnmSpeed, ULONG aMaskedIfs,
    89848983                             const char *pszCaptureFilename)
    89858984{
     
    89918990    AssertReturn(!that->isWriteLockOnCurrentThread(), VERR_GENERAL_FAILURE);
    89928991
     8992    VUSBSPEED enmSpeed = VUSB_SPEED_UNKNOWN;
     8993    switch (aEnmSpeed)
     8994    {
     8995        case USBConnectionSpeed_Low:        enmSpeed = VUSB_SPEED_LOW;          break;
     8996        case USBConnectionSpeed_Full:       enmSpeed = VUSB_SPEED_FULL;         break;
     8997        case USBConnectionSpeed_High:       enmSpeed = VUSB_SPEED_HIGH;         break;
     8998        case USBConnectionSpeed_Super:      enmSpeed = VUSB_SPEED_SUPER;        break;
     8999        case USBConnectionSpeed_SuperPlus:  enmSpeed = VUSB_SPEED_SUPERPLUS;    break;
     9000        default:                            AssertFailed();                     break;
     9001    }
     9002
    89939003    int vrc = PDMR3UsbCreateProxyDevice(pUVM, aUuid, pszBackend, aAddress, pvRemoteBackend,
    8994                                         aPortVersion == 3 ? VUSB_STDVER_30 :
    8995                                         aPortVersion == 2 ? VUSB_STDVER_20 : VUSB_STDVER_11,
    8996                                         aMaskedIfs, pszCaptureFilename);
     9004                                        enmSpeed, aMaskedIfs, pszCaptureFilename);
    89979005    LogFlowFunc(("vrc=%Rrc\n", vrc));
    89989006    LogFlowFuncLeave();
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