Changeset 23671 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 10, 2009 3:19:04 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl-LiveMigration.cpp
r23669 r23671 376 376 if (RT_FAILURE(vrc)) 377 377 return setError(E_FAIL, tr("Failed to read welcome message: %Rrc"), vrc); 378 if ( !strcmp(szLine, g_szWelcome))378 if (strcmp(szLine, g_szWelcome)) 379 379 return setError(E_FAIL, tr("Unexpected welcome '%s'"), szLine); 380 380 … … 434 434 pState->mptrProgress->notifyComplete(hrc); 435 435 436 if ( FAILED(hrc)437 &&pState->mptrConsole->mMachineState == MachineState_Saving)436 AutoWriteLock autoLock(pState->mptrConsole); 437 if (pState->mptrConsole->mMachineState == MachineState_Saving) 438 438 { 439 439 VMSTATE enmVMState = VMR3GetState(pState->mpVM); 440 switch (enmVMState) 441 { 442 case VMSTATE_RUNNING: 443 case VMSTATE_RUNNING_LS: 444 case VMSTATE_DEBUGGING: 445 case VMSTATE_DEBUGGING_LS: 446 case VMSTATE_POWERING_OFF: 447 case VMSTATE_POWERING_OFF_LS: 448 case VMSTATE_RESETTING: 449 case VMSTATE_RESETTING_LS: 450 pState->mptrConsole->setMachineState(MachineState_Running); 451 break; 452 case VMSTATE_GURU_MEDITATION: 453 case VMSTATE_GURU_MEDITATION_LS: 454 pState->mptrConsole->setMachineState(MachineState_Stuck); 455 break; 456 default: 457 AssertMsgFailed(("%s\n", VMR3GetStateName(enmVMState))); 458 case VMSTATE_SUSPENDED: 459 case VMSTATE_SUSPENDED_LS: 460 case VMSTATE_SUSPENDING: 461 case VMSTATE_SUSPENDING_LS: 462 case VMSTATE_SUSPENDING_EXT_LS: 440 if (SUCCEEDED(hrc)) 441 { 442 if (enmVMState == VMSTATE_SUSPENDED) 463 443 pState->mptrConsole->setMachineState(MachineState_Paused); 464 break; 444 } 445 else 446 { 447 switch (enmVMState) 448 { 449 case VMSTATE_RUNNING: 450 case VMSTATE_RUNNING_LS: 451 case VMSTATE_DEBUGGING: 452 case VMSTATE_DEBUGGING_LS: 453 case VMSTATE_POWERING_OFF: 454 case VMSTATE_POWERING_OFF_LS: 455 case VMSTATE_RESETTING: 456 case VMSTATE_RESETTING_LS: 457 pState->mptrConsole->setMachineState(MachineState_Running); 458 break; 459 case VMSTATE_GURU_MEDITATION: 460 case VMSTATE_GURU_MEDITATION_LS: 461 pState->mptrConsole->setMachineState(MachineState_Stuck); 462 break; 463 default: 464 AssertMsgFailed(("%s\n", VMR3GetStateName(enmVMState))); 465 case VMSTATE_SUSPENDED: 466 case VMSTATE_SUSPENDED_LS: 467 case VMSTATE_SUSPENDING: 468 case VMSTATE_SUSPENDING_LS: 469 case VMSTATE_SUSPENDING_EXT_LS: 470 pState->mptrConsole->setMachineState(MachineState_Paused); 471 break; 472 } 465 473 } 466 474 }
Note:
See TracChangeset
for help on using the changeset viewer.