Changeset 55977 in vbox for trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
- Timestamp:
- May 20, 2015 4:52:25 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 100486
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r55749 r55977 1332 1332 const Utf8Str &strName, 1333 1333 const Utf8Str &strDescription, 1334 const Guid &uuidSnapshot, 1334 1335 bool fPause, 1335 1336 uint32_t uMemSize, … … 1338 1339 m_strName(strName), 1339 1340 m_strDescription(strDescription), 1341 m_uuidSnapshot(uuidSnapshot), 1340 1342 m_fPause(fPause), 1341 1343 m_uMemSize(uMemSize), … … 1357 1359 Utf8Str m_strName; 1358 1360 Utf8Str m_strDescription; 1361 Guid m_uuidSnapshot; 1359 1362 Utf8Str m_strStateFilePath; 1360 1363 ComPtr<IInternalSessionControl> m_pDirectControl; … … 1412 1415 const com::Utf8Str &aDescription, 1413 1416 BOOL fPause, 1417 com::Guid &aId, 1414 1418 ComPtr<IProgress> &aProgress) 1415 1419 { … … 1417 1421 NOREF(aDescription); 1418 1422 NOREF(fPause); 1423 NOREF(aId); 1419 1424 NOREF(aProgress); 1420 1425 ReturnComNotImplemented(); … … 1424 1429 const com::Utf8Str &aDescription, 1425 1430 BOOL fPause, 1431 com::Guid &aId, 1426 1432 ComPtr<IProgress> &aProgress) 1427 1433 { … … 1482 1488 return rc; 1483 1489 1490 /* create an ID for the snapshot */ 1491 Guid snapshotId; 1492 snapshotId.create(); 1493 1484 1494 /* create and start the task on a separate thread (note that it will not 1485 1495 * start working until we release alock) */ … … 1490 1500 aName, 1491 1501 aDescription, 1502 snapshotId, 1492 1503 !!fPause, 1493 1504 mHWData->mMemorySize, … … 1509 1520 i_setMachineState(MachineState_Snapshotting); 1510 1521 1522 aId = snapshotId; 1511 1523 pTask->m_pProgress.queryInterfaceTo(aProgress.asOutParam()); 1512 1524 … … 1555 1567 bool fBeganTakingSnapshot = false; 1556 1568 BOOL fSuspendedBySave = FALSE; 1557 Guid snapshotId;1558 1569 1559 1570 try … … 1606 1617 /* STEP 1: create the snapshot object */ 1607 1618 1608 /* create an ID for the snapshot */1609 snapshotId.create();1610 1611 1619 /* create a snapshot machine object */ 1612 1620 ComObjPtr<SnapshotMachine> pSnapshotMachine; 1613 1621 pSnapshotMachine.createObject(); 1614 rc = pSnapshotMachine->init(this, snapshotId.ref(), task.m_strStateFilePath);1622 rc = pSnapshotMachine->init(this, task.m_uuidSnapshot.ref(), task.m_strStateFilePath); 1615 1623 AssertComRCThrowRC(rc); 1616 1624 … … 1620 1628 task.m_pSnapshot.createObject(); 1621 1629 rc = task.m_pSnapshot->init(mParent, 1622 snapshotId,1630 task.m_uuidSnapshot, 1623 1631 task.m_strName, 1624 1632 task.m_strDescription, … … 1797 1805 1798 1806 if (SUCCEEDED(rc)) 1799 mParent->i_onSnapshotTaken(mData->mUuid, snapshotId);1807 mParent->i_onSnapshotTaken(mData->mUuid, task.m_uuidSnapshot); 1800 1808 LogFlowThisFuncLeave(); 1801 1809 }
Note:
See TracChangeset
for help on using the changeset viewer.