Changeset 23763 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 14, 2009 2:39:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r23750 r23763 2453 2453 aDevice, aControllerPort, aControllerName); 2454 2454 2455 ComObjPtr<Medium> hd = pAttach->medium();2456 2455 2457 2456 if (pAttach->isImplicit()) … … 2472 2471 alock.leave(); 2473 2472 2473 ComObjPtr<Medium> hd = pAttach->medium(); 2474 2474 rc = hd->deleteStorageAndWait(); 2475 2475 … … 2578 2578 if (SUCCEEDED(rc)) 2579 2579 { 2580 2581 mMediaData.backup(); 2582 /* The backup operation makes the pAttach reference point to the 2583 * old settings. Re-get the correct reference. */ 2584 pAttach = findAttachment(mMediaData->mAttachments, 2585 aControllerName, 2586 aControllerPort, 2587 aDevice); 2580 2588 AutoWriteLock attLock(pAttach); 2589 if (!medium.isNull()) 2590 medium->attachTo(mData->mUuid); 2581 2591 pAttach->updateMedium(medium, false /* aImplicit */); 2582 2592 } … … 5573 5583 CheckComRCBreakRC(rc); 5574 5584 5575 if (dev.deviceType == DeviceType_HardDisk) 5576 { 5577 /* associate the hard disk with this machine and snapshot */ 5578 if (mType == IsSnapshotMachine) 5579 rc = medium->attachTo(mData->mUuid, *aSnapshotId); 5580 else 5581 rc = medium->attachTo(mData->mUuid); 5582 AssertComRCBreakRC (rc); 5583 } 5585 /* associate the medium with this machine and snapshot */ 5586 if (mType == IsSnapshotMachine) 5587 rc = medium->attachTo(mData->mUuid, *aSnapshotId); 5588 else 5589 rc = medium->attachTo(mData->mUuid); 5590 AssertComRCBreakRC (rc); 5584 5591 5585 5592 /* backup mMediaData to let registeredInit() properly rollback on failure
Note:
See TracChangeset
for help on using the changeset viewer.