Changeset 24937 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 25, 2009 10:58:13 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r24922 r24937 2620 2620 rc = pProgress->init(static_cast<IConsole*>(this), 2621 2621 Bstr(tr("Taking a snapshot of the virtual machine")), 2622 FALSE/* aCancelable */,2622 mMachineState == MachineState_Running /* aCancelable */, 2623 2623 cOperations, 2624 2624 ulTotalOperationsWeight, … … 5847 5847 break; 5848 5848 5849 /* Change the machine state from Starting, Restoring or Paused5850 * to Running */5851 5849 Assert( ( ( that->mMachineState == MachineState_Starting 5852 5850 || that->mMachineState == MachineState_Paused) … … 5854 5852 || ( ( that->mMachineState == MachineState_Restoring 5855 5853 || that->mMachineState == MachineState_TeleportingIn 5856 || that->mMachineState == MachineState_Paused) 5854 || that->mMachineState == MachineState_Paused 5855 || that->mMachineState == MachineState_Saving 5856 ) 5857 5857 && aOldState == VMSTATE_RESUMING)); 5858 5859 5858 that->setMachineState(MachineState_Running); 5860 5859 } … … 7330 7329 7331 7330 /** 7331 * Progress cancelation callback employed by Console::fntTakeSnapshotWorker. 7332 */ 7333 static void takesnapshotProgressCancelCallback(void *pvUser) 7334 { 7335 PVM pVM = (PVM)pvUser; 7336 SSMR3Cancel(pVM); 7337 } 7338 7339 /** 7332 7340 * Worker thread created by Console::TakeSnapshot. 7333 7341 * @param Thread The current thread (ignored). … … 7399 7407 pTask->mProgress->SetNextOperation(Bstr(tr("Saving the machine state")), 7400 7408 pTask->ulMemSize); // operation weight, same as computed when setting up progress object 7409 pTask->mProgress->setCancelCallback(takesnapshotProgressCancelCallback, that->mpVM); 7401 7410 7402 7411 alock.leave(); … … 7414 7423 strSavedStateFile.c_str(), vrc); 7415 7424 7425 pTask->mProgress->setCancelCallback(NULL, NULL); 7426 if (!pTask->mProgress->notifyPointOfNoReturn()) 7427 throw setError(E_FAIL, tr("Cancelled")); 7416 7428 7417 7429 // STEP 4: reattach hard disks
Note:
See TracChangeset
for help on using the changeset viewer.