Changeset 25907 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 18, 2010 7:12:45 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56723
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MediumImpl.cpp
r25903 r25907 4130 4130 if (FAILED(rc)) return rc; 4131 4131 4132 ComObjPtr 4132 ComObjPtr<Progress> progress; 4133 4133 4134 4134 if (aProgress != NULL) -
trunk/src/VBox/Main/SnapshotImpl.cpp
r25903 r25907 1760 1760 /* grab differencing hard disks from the old attachments that will 1761 1761 * become unused and need to be auto-deleted */ 1762 1763 1762 std::list< ComObjPtr<MediumAttachment> > llDiffAttachmentsToDelete; 1764 1763 … … 1801 1800 1802 1801 // detach the current-state diffs that we detected above and build a list of 1803 // image s to delete _after_ saveSettings()1802 // image files to delete _after_ saveSettings() 1804 1803 1805 1804 MediaList llDiffsToDelete; … … 1835 1834 1836 1835 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 1837 if (fNeedsSaveSettings)1838 // VirtualBox.xml needs saving too: must not hold machine lock at this point!1839 mParent->saveSettings();1840 1841 1836 alock.enter(); 1842 1837 1843 // save allsettings, reset the modified flag and commit;1838 // save machine settings, reset the modified flag and commit; 1844 1839 rc = saveSettings(SaveS_ResetCurStateModified | saveFlags); 1845 1840 if (FAILED(rc)) throw rc; 1841 1842 // let go of the locks while we're deleting image files below 1843 alock.leave(); 1844 vboxLock.release(); 1846 1845 1847 1846 // from here on we cannot roll back on failure any more … … 1854 1853 LogFlowThisFunc(("Deleting old current state in differencing image '%s'\n", pMedium->getName().raw())); 1855 1854 1856 HRESULT rc2 = pMedium->deleteStorageAndWait(NULL /*aProgress*/, NULL /*pfNeedsSaveSettings*/);1855 HRESULT rc2 = pMedium->deleteStorageAndWait(NULL /*aProgress*/, &fNeedsSaveSettings); 1857 1856 // ignore errors here because we cannot roll back after saveSettings() above 1858 1857 if (SUCCEEDED(rc2)) 1859 1858 pMedium->uninit(); 1859 } 1860 1861 if (fNeedsSaveSettings) 1862 { 1863 // finally, VirtualBox.xml needs saving too 1864 vboxLock.acquire(); 1865 mParent->saveSettings(); 1860 1866 } 1861 1867 }
Note:
See TracChangeset
for help on using the changeset viewer.