- Timestamp:
- Aug 15, 2012 11:32:14 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r42789 r42823 5945 5945 { 5946 5946 /* find all attached devices to the appropriate storage controller and detach them all */ 5947 size_t howManyAttach = mMediaData->mAttachments.size(); 5948 5949 for (size_t i = 0; i < howManyAttach; ++i) 5950 { 5951 MediumAttachment *pAttachTemp = mMediaData->mAttachments.front(); 5947 // make a temporary list because detachDevice invalidates iterators into 5948 // mMediaData->mAttachments 5949 MediaData::AttachmentList llAttachments2 = mMediaData->mAttachments; 5950 5951 for (MediaData::AttachmentList::iterator it = llAttachments2.begin(); 5952 it != llAttachments2.end(); 5953 ++it) 5954 { 5955 MediumAttachment *pAttachTemp = *it; 5952 5956 5953 5957 AutoCaller localAutoCaller(pAttachTemp); … … 5958 5962 if (pAttachTemp->getControllerName() == aName) 5959 5963 { 5960 LONG port = pAttachTemp->getPort();5961 LONG device = pAttachTemp->getDevice();5962 5963 //rc = DetachDevice(aName, port, device);5964 5964 rc = detachDevice(pAttachTemp, alock, NULL); 5965 5965 if (FAILED(rc)) return rc;
Note:
See TracChangeset
for help on using the changeset viewer.