Changeset 8484 in vbox for trunk/src/VBox
- Timestamp:
- Apr 30, 2008 12:12:33 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30356
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r8475 r8484 1481 1481 * to the new locking scheme). 1482 1482 */ 1483 HRESULT Host::detachAllUSBDevices (SessionMachine *aMachine, BOOL aDone )1483 HRESULT Host::detachAllUSBDevices (SessionMachine *aMachine, BOOL aDone, bool aAbnormal) 1484 1484 { 1485 1485 AutoWriteLock alock (this); … … 1500 1500 */ 1501 1501 bool fRunFilters = false; 1502 HRESULT hrc = device->onDetachFromVM(aMachine, aDone, &fRunFilters );1502 HRESULT hrc = device->onDetachFromVM(aMachine, aDone, &fRunFilters, aAbnormal); 1503 1503 if ( SUCCEEDED(hrc) 1504 1504 && fRunFilters) -
trunk/src/VBox/Main/MachineImpl.cpp
r8388 r8484 7401 7401 } 7402 7402 7403 #ifdef VBOX_WITH_USB 7403 7404 /* release all captured USB devices */ 7404 7405 if (aReason == Uninit::Abnormal && lastState >= MachineState_Running) … … 7408 7409 * Console::detachAllUSBDevices() will be called upon successful 7409 7410 * termination. So, we need to release USB devices only if there was 7410 * an abnormal termination of a running VM. */ 7411 DetachAllUSBDevices (TRUE /* aDone */); 7412 } 7411 * an abnormal termination of a running VM. 7412 * 7413 * This is identical to SessionMachine::DetachAllUSBDevices except 7414 * for the aAbnormal argument. */ 7415 HRESULT rc = mUSBController->notifyProxy (false /* aInsertFilters */); 7416 AssertComRC (rc); 7417 NOREF (rc); 7418 7419 mParent->host()->detachAllUSBDevices (this, true /* aDone */, true /* aAbnormal */); 7420 } 7421 #endif /* VBOX_WITH_USB */ 7413 7422 7414 7423 if (!mData->mSession.mType.isNull()) … … 7682 7691 NOREF (rc); 7683 7692 7684 return mParent->host()->detachAllUSBDevices (this, aDone );7693 return mParent->host()->detachAllUSBDevices (this, aDone, false /* aAbnormal */); 7685 7694 #else 7686 7695 return S_OK; -
trunk/src/VBox/Main/darwin/iokit.cpp
r8155 r8484 1108 1108 */ 1109 1109 irc = (*ppDevI)->USBDeviceReEnumerate(ppDevI, 0); 1110 if (irc != kIOReturnSuccess) 1110 if (irc == kIOReturnSuccess) 1111 vrc = VINF_SUCCESS; 1112 else 1111 1113 { 1112 1114 LogRel(("USB: Failed to open device '%s', plug-in creation failed with irc=%#x.\n", pszAddress, irc)); -
trunk/src/VBox/Main/include/HostImpl.h
r8471 r8484 117 117 HRESULT detachUSBDevice (SessionMachine *aMachine, INPTR GUIDPARAM aId, BOOL aDone); 118 118 HRESULT autoCaptureUSBDevices (SessionMachine *aMachine); 119 HRESULT detachAllUSBDevices (SessionMachine *aMachine, BOOL aDone );119 HRESULT detachAllUSBDevices (SessionMachine *aMachine, BOOL aDone, bool aAbnormal); 120 120 121 121 void onUSBDeviceAttached (HostUSBDevice *aDevice);
Note:
See TracChangeset
for help on using the changeset viewer.