- Timestamp:
- Jul 4, 2012 2:18:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r42015 r42021 5827 5827 if (FAILED(rc)) return rc; 5828 5828 5829 { /* find all attached devices to the appropriate storage controller and detach them all*/5830 MediaData::AttachmentList::const_iterator beginList = mMediaData->mAttachments.begin();5829 { 5830 /* find all attached devices to the appropriate storage controller and detach them all*/ 5831 5831 MediaData::AttachmentList::const_iterator endList = mMediaData->mAttachments.end(); 5832 MediaData::AttachmentList::const_iterator it = mMediaData->mAttachments.begin(); 5833 MediumAttachment *pAttachTemp=NULL; 5832 5834 LONG port = 0; 5833 5835 LONG device = 0; 5834 5836 5835 for (MediaData::AttachmentList::const_iterator it = beginList; 5836 it != endList; 5837 it++) 5838 { 5839 if ((*it)->getControllerName() == aName) 5837 for (;it != endList; it++) 5838 { 5839 pAttachTemp = *it; 5840 AutoCaller localAutoCaller(pAttachTemp); 5841 if (FAILED(localAutoCaller.rc())) return localAutoCaller.rc(); 5842 5843 AutoReadLock local_alock(pAttachTemp COMMA_LOCKVAL_SRC_POS); 5844 5845 if (pAttachTemp->getControllerName() == aName) 5840 5846 { 5841 port = (*it)->getPort(); 5842 5843 device = (*it)->getDevice(); 5847 5848 port = pAttachTemp->getPort(); 5849 5850 device = pAttachTemp->getDevice(); 5844 5851 5845 5852 rc = DetachDevice(aName, port, device);
Note:
See TracChangeset
for help on using the changeset viewer.