Changeset 60742 in vbox for trunk/src/VBox/Main/src-server/linux/USBProxyBackendLinux.cpp
- Timestamp:
- Apr 28, 2016 1:55:03 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106933
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/linux/USBProxyBackendLinux.cpp
r60107 r60742 269 269 270 270 271 bool USBProxyBackendLinux::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,272 SessionMachine **aIgnoreMachine)273 {274 AssertReturn(aDevice, false);275 AssertReturn(!aDevice->isWriteLockOnCurrentThread(), false);276 AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS);277 if ( aUSBDevice->enmState == USBDEVICESTATE_USED_BY_HOST_CAPTURABLE278 && aDevice->i_getUsbData()->enmState == USBDEVICESTATE_USED_BY_HOST)279 LogRel(("USBProxy: Device %04x:%04x (%s) has become accessible.\n",280 aUSBDevice->idVendor, aUSBDevice->idProduct, aUSBDevice->pszAddress));281 devLock.release();282 return updateDeviceStateFake(aDevice, aUSBDevice, aRunFilters, aIgnoreMachine);283 }284 285 286 271 /** 287 272 * A device was added, we need to adjust mUdevPolls. 288 * 289 * See USBProxyService::deviceAdded for details. 290 */ 291 void USBProxyBackendLinux::deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines, 292 PUSBDEVICE aUSBDevice) 273 */ 274 void USBProxyBackendLinux::deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, PUSBDEVICE pDev) 293 275 { 294 276 AssertReturnVoid(aDevice); 295 277 AssertReturnVoid(!aDevice->isWriteLockOnCurrentThread()); 296 278 AutoReadLock devLock(aDevice COMMA_LOCKVAL_SRC_POS); 297 if ( aUSBDevice->enmState == USBDEVICESTATE_USED_BY_HOST)298 { 299 LogRel(("USBProxy : Device %04x:%04x (%s) isn't accessible. giving udev a few seconds to fix this...\n",300 aUSBDevice->idVendor, aUSBDevice->idProduct, aUSBDevice->pszAddress));279 if (pDev->enmState == USBDEVICESTATE_USED_BY_HOST) 280 { 281 LogRel(("USBProxyBackendLinux: Device %04x:%04x (%s) isn't accessible. giving udev a few seconds to fix this...\n", 282 pDev->idVendor, pDev->idProduct, pDev->pszAddress)); 301 283 mUdevPolls = 10; /* (10 * 500ms = 5s) */ 302 284 } 303 285 304 286 devLock.release(); 305 USBProxyBackend::deviceAdded(aDevice, llOpenedMachines, aUSBDevice);306 287 } 307 288
Note:
See TracChangeset
for help on using the changeset viewer.