VirtualBox

Ignore:
Timestamp:
Apr 28, 2016 1:55:03 PM (9 years ago)
Author:
vboxsync
Message:

Main/USBProxy{Service|Backend}: Rework interaction between thos two to be more sane than it currently is (calling into each other back and forth)

File:
1 edited

Legend:

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

    r60713 r60742  
    435435
    436436
    437 bool USBProxyBackendUsbIp::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,
    438                                              SessionMachine **aIgnoreMachine)
    439 {
    440     AssertReturn(aDevice, false);
    441     AssertReturn(!aDevice->isWriteLockOnCurrentThread(), false);
    442     AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS);
    443     if (    aUSBDevice->enmState == USBDEVICESTATE_USED_BY_HOST_CAPTURABLE
    444         &&  aDevice->i_getUsbData()->enmState == USBDEVICESTATE_USED_BY_HOST)
    445         LogRel(("USBProxy: Device %04x:%04x (%s) has become accessible.\n",
    446                 aUSBDevice->idVendor, aUSBDevice->idProduct, aUSBDevice->pszAddress));
    447     devLock.release();
    448     return updateDeviceStateFake(aDevice, aUSBDevice, aRunFilters, aIgnoreMachine);
    449 }
    450 
    451 
    452437int USBProxyBackendUsbIp::wait(RTMSINTERVAL aMillies)
    453438{
     
    504489                if (fEventsRecv & RTPOLL_EVT_READ)
    505490                    rc = receiveData();
    506                 else if (fEventsRecv & RTPOLL_EVT_ERROR)
     491                if (   RT_SUCCESS(rc)
     492                    && (fEventsRecv & RTPOLL_EVT_ERROR))
    507493                    rc = VERR_NET_SHUTDOWN;
    508494
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