VirtualBox

Changeset 60712 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 27, 2016 8:01:06 AM (9 years ago)
Author:
vboxsync
Message:

Main/HostUSBDevice: Fix crash on Windows if the USB/IP backend is enabled, the hub name is only available for devices attached directly to the host

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp

    r59381 r60712  
    10521052    /* The hub/bus + port should help a lot in a re-attach situation. */
    10531053#ifdef RT_OS_WINDOWS
    1054     iDiff = strcmp(aDev1->pszHubName, aDev2->pszHubName);
    1055     if (iDiff)
    1056     {
    1057         //Log3(("compare: HubName: %s != %s\n", aDev1->pszHubName, aDev2->pszHubName));
    1058         return iDiff;
     1054    /* The hub name makes only sense for the host backend. */
     1055    if (   !strcmp(aDev1->pszBackend, "host")
     1056        && aDev1->pszHubName
     1057        && aDev2->pszHubName)
     1058    {
     1059        iDiff = strcmp(aDev1->pszHubName, aDev2->pszHubName);
     1060        if (iDiff)
     1061        {
     1062            //Log3(("compare: HubName: %s != %s\n", aDev1->pszHubName, aDev2->pszHubName));
     1063            return iDiff;
     1064        }
    10591065    }
    10601066#else
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