VirtualBox

Changeset 60551 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Apr 18, 2016 5:37:22 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106680
Message:

Main/USBProxyService,USBProxyBackendUsbIp: Fixes

Location:
trunk/src/VBox/Main/src-server
Files:
2 edited

Legend:

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

    r60107 r60551  
    155155         ++it)
    156156    {
    157         USBProxyBackend *pUsbProxyBackend = *it;
     157        ComObjPtr<USBProxyBackend> pUsbProxyBackend = *it;
    158158        void *pvId = pUsbProxyBackend->insertFilter(aFilter);
    159159
     
    172172         ++it)
    173173    {
    174         USBProxyBackend *pUsbProxyBackend = it->first;
     174        ComObjPtr<USBProxyBackend> pUsbProxyBackend = it->first;
    175175        pUsbProxyBackend->removeFilter(it->second);
    176176    }
     
    236236        {
    237237            mBackends.erase(it);
    238             UsbProxyBackend->uninit();
     238
     239            /*
     240             * The proxy backend uninit method will be called when the pointer goes
     241             * out of scope.
     242             */
    239243
    240244            alock.release();
  • trunk/src/VBox/Main/src-server/generic/USBProxyBackendUsbIp.cpp

    r60107 r60551  
    380380        rc = RTPipeClose(m->hWakeupPipeW);
    381381        AssertRC(rc);
     382
     383        m->hPollSet = NIL_RTPOLLSET;
     384        m->hWakeupPipeR = NIL_RTPIPE;
     385        m->hWakeupPipeW = NIL_RTPIPE;
    382386    }
    383387
     
    385389        RTStrFree(m->pszHost);
    386390    if (m->hMtxDevices != NIL_RTSEMFASTMUTEX)
     391    {
    387392        RTSemFastMutexDestroy(m->hMtxDevices);
     393        m->hMtxDevices = NIL_RTSEMFASTMUTEX;
     394    }
    388395
    389396    delete m;
     
    455462
    456463    /* Query a new device list upon entering. */
    457     if (m->enmRecvState == kUsbIpRecvState_None)
     464    if (   RT_SUCCESS(rc)
     465        && m->enmRecvState == kUsbIpRecvState_None)
    458466    {
    459467        rc = startListExportedDevicesReq();
     
    695703            m->hSocket = NIL_RTSOCKET;
    696704        }
     705        else
     706            LogRel(("USB/IP: Connected to host \"%s\"\n", m->pszHost));
    697707    }
    698708
     
    907917        pNew->enmState           = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
    908918        pNew->u64SerialHash      = 0;
    909         pNew->bBus               = (uint8_t)pDev->u32BusNum;
    910         pNew->bPort              = (uint8_t)pDev->u32DevNum;
     919        /** @todo: The following is not correct but is required to to get USB testing working
     920         * because only the port can be part of a filter (adding the required attributes for the bus
     921         * breaks API and ABI compatibility).
     922         * Filtering by port number is required for USB testing to connect to the correct device
     923         * in case there are multiple ones.
     924         */
     925        pNew->bBus               = (uint8_t)pDev->u32DevNum;
     926        pNew->bPort              = (uint8_t)pDev->u32BusNum;
    911927
    912928        switch (pDev->u32Speed)
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