Changeset 23335 in vbox for trunk/src/VBox/Main
- Timestamp:
- Sep 25, 2009 2:58:47 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r23223 r23335 2401 2401 mMachineState); 2402 2402 2403 /* memorize the current machine state */2404 MachineState_T lastMachineState = mMachineState;2405 2406 #ifndef VBOX_WITH_LIVE_MIGRATION /** @todo update the API docs. */2407 if (mMachineState == MachineState_Running)2408 {2409 HRESULT rc = Pause();2410 CheckComRCReturnRC(rc);2411 }2412 #endif2413 2414 2403 HRESULT rc = S_OK; 2415 2404 … … 2497 2486 pTask->fTakingSnapshotOnline = fTakingSnapshotOnline; 2498 2487 2488 #ifndef VBOX_WITH_LIVE_MIGRATION /** @todo update the API docs. */ 2499 2489 if (mMachineState == MachineState_Running) 2500 2490 { … … 2502 2492 if (FAILED(rc)) throw rc; 2503 2493 } 2494 #endif 2504 2495 2505 2496 int vrc = RTThreadCreate(NULL, … … 7056 7047 /** 7057 7048 * Worker thread created by Console::TakeSnapshot. 7058 * @param Thread 7059 * @param pvUser 7060 * @return 7049 * @param Thread The current thread (ignored). 7050 * @param pvUser The task. 7051 * @return VINF_SUCCESS (ignored). 7061 7052 */ 7062 7053 /*static*/ … … 7124 7115 int vrc = VMR3Save(that->mpVM, 7125 7116 strSavedStateFile.c_str(), 7126 false, // bool fContinueAfterwards; @todo r=dj Knut, what needs to be put here now?7117 true /*fContinueAfterwards*/, 7127 7118 Console::stateProgressCallback, 7128 7119 (void*)pTask); -
trunk/src/VBox/Main/MachineImpl.cpp
r23331 r23335 8281 8281 8282 8282 #ifdef VBOX_WITH_LIVE_MIGRATION 8283 AssertReturn( ( !Global::IsOnlineOrTransient (mData->mMachineState) 8284 || mData->mMachineState == MachineState_Paused 8285 || mData->mMachineState == MachineState_Running 8286 ) 8287 && mSnapshotData.mLastState == MachineState_Null 8288 && mSnapshotData.mSnapshot.isNull() 8289 && mSnapshotData.mServerProgress.isNull() 8290 && mSnapshotData.mCombinedProgress.isNull(), E_FAIL); 8283 AssertReturn( !Global::IsOnlineOrTransient(mData->mMachineState) 8284 || mData->mMachineState == MachineState_Running 8285 || mData->mMachineState == MachineState_Paused, E_FAIL); 8291 8286 #else 8292 8287 AssertReturn( !Global::IsOnlineOrTransient(mData->mMachineState) 8293 8288 || mData->mMachineState == MachineState_Paused, E_FAIL); 8289 #endif 8294 8290 AssertReturn(mSnapshotData.mLastState == MachineState_Null, E_FAIL); 8295 8291 AssertReturn(mSnapshotData.mSnapshot.isNull(), E_FAIL); 8296 #endif8297 8292 8298 8293 if ( !fTakingSnapshotOnline … … 8429 8424 E_FAIL); 8430 8425 8431 /* set the state to the state we had when BeginTakingSnapshot() was called 8432 * (this is expected by Console::TakeSnapshot() and 8433 * Console::saveStateThread()) */ 8434 if (mData->mMachineState != mSnapshotData.mLastState) 8426 /* 8427 * Restore the state we had when BeginTakingSnapshot() was called, 8428 * Console::fntTakeSnapshotWorker restores its local copy when we return. 8429 * If the state was Running, then let Console::fntTakeSnapshotWorker it 8430 * all via Console::Resume(). 8431 */ 8432 if ( mData->mMachineState != mSnapshotData.mLastState 8433 && mSnapshotData.mLastState != MachineState_Running) 8435 8434 setMachineState(mSnapshotData.mLastState); 8436 8435
Note:
See TracChangeset
for help on using the changeset viewer.