Changeset 55233 in vbox for trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
- Timestamp:
- Apr 14, 2015 9:07:45 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 99544
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r55214 r55233 1430 1430 Global::stringifyMachineState(mData->mMachineState)); 1431 1431 1432 HRESULT rc = S_OK; 1432 HRESULT rc = i_checkStateDependency(MutableOrSavedOrRunningStateDep); 1433 if (FAILED(rc)) 1434 return rc; 1433 1435 1434 1436 // prepare the progress object: … … 1584 1586 { 1585 1587 Bstr value; 1586 HRESULTrc = GetExtraData(Bstr("VBoxInternal2/ForceTakeSnapshotWithoutState").raw(),1587 1588 rc = GetExtraData(Bstr("VBoxInternal2/ForceTakeSnapshotWithoutState").raw(), 1589 value.asOutParam()); 1588 1590 if (FAILED(rc) || value != "1") 1589 1591 // creating a new online snapshot: we need a fresh saved state file … … 1951 1953 Global::stringifyMachineState(mData->mMachineState)); 1952 1954 1955 HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep); 1956 if (FAILED(rc)) 1957 return rc; 1958 1953 1959 ISnapshot* iSnapshot = aSnapshot; 1954 1960 ComObjPtr<Snapshot> pSnapshot(static_cast<Snapshot*>(iSnapshot)); 1955 1961 ComObjPtr<SnapshotMachine> pSnapMachine = pSnapshot->i_getSnapshotMachine(); 1956 1957 HRESULT rc = S_OK;1958 1962 1959 1963 // create a progress object. The number of operations is: … … 2351 2355 AssertReturn(!aStartId.isZero() && !aEndId.isZero() && aStartId.isValid() && aEndId.isValid(), E_INVALIDARG); 2352 2356 2353 2354 2357 /** @todo implement the "and all children" and "range" variants */ 2355 2358 if (aDeleteAllChildren || aStartId != aEndId) … … 2375 2378 Global::stringifyMachineState(mData->mMachineState)); 2376 2379 2380 HRESULT rc = i_checkStateDependency(MutableOrSavedOrRunningStateDep); 2381 if (FAILED(rc)) 2382 return rc; 2383 2377 2384 ComObjPtr<Snapshot> pSnapshot; 2378 HRESULT rc = i_findSnapshotById(aStartId, pSnapshot, true /* aSetError */); 2379 if (FAILED(rc)) return rc; 2385 rc = i_findSnapshotById(aStartId, pSnapshot, true /* aSetError */); 2386 if (FAILED(rc)) 2387 return rc; 2380 2388 2381 2389 AutoWriteLock snapshotLock(pSnapshot COMMA_LOCKVAL_SRC_POS);
Note:
See TracChangeset
for help on using the changeset viewer.