VirtualBox

Changeset 83196 in vbox


Ignore:
Timestamp:
Mar 4, 2020 8:32:25 AM (5 years ago)
Author:
vboxsync
Message:

VMM/PDMUsb: Always include the device name and instance number to avoid a STAM assertion about duplicate sample names when the "USB Device Reset Timer" is created for different USB devices with only a single instance each

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp

    r82968 r83196  
    18251825             pUsbIns->pReg->szName, pUsbIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, ppTimer));
    18261826
    1827     if (pUsbIns->iInstance > 0) /** @todo use a string cache here later. */
    1828     {
    1829          char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_USB_DESC, "%s [%u]", pszDesc, pUsbIns->iInstance);
    1830          if (pszDesc2)
    1831              pszDesc = pszDesc2;
    1832     }
     1827    /** @todo use a string cache here later. */
     1828    char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_USB_DESC, "%s[%s:%u]", pszDesc, pUsbIns->Internal.s.pUsbDev->pReg->szName, pUsbIns->iInstance);
     1829    if (pszDesc2)
     1830        pszDesc = pszDesc2;
    18331831
    18341832    int rc = TMR3TimerCreateUsb(pVM, pUsbIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer);
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