- Timestamp:
- Nov 23, 2009 5:40:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r24786 r24882 1725 1725 case MachineState_Paused: 1726 1726 case MachineState_TeleportingPausedVM: 1727 case MachineState_Saving: 1727 1728 return setError(VBOX_E_INVALID_VM_STATE, tr("Already paused")); 1728 1729 … … 5771 5772 case VMSTATE_SUSPENDED: 5772 5773 { 5773 if (aOldState == VMSTATE_SUSPENDING) 5774 AutoWriteLock alock(that); 5775 5776 if (that->mVMStateChangeCallbackDisabled) 5777 break; 5778 5779 switch (that->mMachineState) 5774 5780 { 5775 AutoWriteLock alock(that); 5776 5777 if (that->mVMStateChangeCallbackDisabled) 5781 case MachineState_Teleporting: 5782 that->setMachineState(MachineState_TeleportingPausedVM); 5778 5783 break; 5779 5784 5780 /* Change the machine state from Running to Paused. */ 5781 /** @todo Live Migration: Deal with Pause happening before VMR3Teleport! */ 5782 AssertBreak(that->mMachineState == MachineState_Running); 5783 that->setMachineState(MachineState_Paused); 5785 case MachineState_LiveSnapshotting: 5786 that->setMachineState(MachineState_Saving); 5787 break; 5788 5789 case MachineState_TeleportingPausedVM: 5790 case MachineState_Saving: 5791 case MachineState_Restoring: 5792 /* The worker threads handles the transition. */ 5793 break; 5794 5795 default: 5796 AssertMsgFailed(("%s\n", Global::stringifyMachineState(that->mMachineState))); 5797 case MachineState_Running: 5798 that->setMachineState(MachineState_Paused); 5799 break; 5784 5800 } 5785 5801 break; … … 5792 5808 if (that->mVMStateChangeCallbackDisabled) 5793 5809 break; 5794 if (that->mMachineState == MachineState_Teleporting) 5795 that->setMachineState(MachineState_TeleportingPausedVM); 5796 else if (that->mMachineState == MachineState_LiveSnapshotting) 5797 that->setMachineState(MachineState_Saving); 5798 else 5799 AssertMsgFailed(("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), VMR3GetStateName(aOldState), VMR3GetStateName(aState) )); 5810 switch (that->mMachineState) 5811 { 5812 case MachineState_Teleporting: 5813 that->setMachineState(MachineState_TeleportingPausedVM); 5814 break; 5815 5816 case MachineState_LiveSnapshotting: 5817 that->setMachineState(MachineState_Saving); 5818 break; 5819 5820 case MachineState_TeleportingPausedVM: 5821 case MachineState_Saving: 5822 /* ignore */ 5823 break; 5824 5825 default: 5826 AssertMsgFailed(("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), VMR3GetStateName(aOldState), VMR3GetStateName(aState) )); 5827 that->setMachineState(MachineState_Paused); 5828 break; 5829 } 5800 5830 break; 5801 5831 }
Note:
See TracChangeset
for help on using the changeset viewer.