Changeset 24524 in vbox
- Timestamp:
- Nov 9, 2009 5:47:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r24511 r24524 2823 2823 tr("No drive attached to device slot %d on port %d of controller '%ls'"), 2824 2824 aDevice, aControllerPort, aControllerName); 2825 2826 /* Remember previously mounted medium. The medium before taking the 2827 * backup is not necessarily the same thing. */ 2828 ComObjPtr<Medium> oldmedium; 2829 oldmedium = pAttach->medium(); 2825 2830 2826 2831 Guid id(aId); … … 2900 2905 } 2901 2906 2902 alock.unlock(); 2903 onMediumChange(pAttach, aForce); 2907 alock.leave(); 2908 rc = onMediumChange(pAttach, aForce); 2909 alock.enter(); 2910 2911 /* On error roll back this change only. */ 2912 if (FAILED(rc)) 2913 { 2914 if (!medium.isNull()) 2915 medium->detachFrom(mData->mUuid); 2916 pAttach = findAttachment(mMediaData->mAttachments, 2917 aControllerName, 2918 aControllerPort, 2919 aDevice); 2920 /* If the attachment is gone in the mean time, bail out. */ 2921 if (pAttach.isNull()) 2922 return rc; 2923 AutoWriteLock attLock(pAttach); 2924 pAttach->updateMedium(oldmedium, false /* aImplicit */); 2925 } 2904 2926 2905 2927 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.