Changeset 40276 in vbox
- Timestamp:
- Feb 28, 2012 1:50:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r40257 r40276 2629 2629 if (mMachineState == MachineState_Running) 2630 2630 { 2631 HRESULT rc = Pause(); 2632 if (FAILED(rc)) 2633 return rc; 2631 /* get the VM handle. */ 2632 SafeVMPtr ptrVM(this); 2633 if (!ptrVM.isOk()) 2634 return ptrVM.rc(); 2635 2636 /* release the lock before a VMR3* call (EMT will call us back)! */ 2637 alock.release(); 2638 int vrc = VMR3Suspend(ptrVM); 2639 alock.acquire(); 2640 2641 HRESULT hrc = S_OK; 2642 if (RT_FAILURE(vrc)) 2643 hrc = setError(VBOX_E_VM_ERROR, tr("Could not suspend the machine execution (%Rrc)"), vrc); 2644 if (FAILED(hrc)) 2645 return hrc; 2634 2646 } 2635 2647 … … 2727 2739 setMachineStateLocally(MachineState_Paused); 2728 2740 /* restore the running state if appropriate */ 2729 Resume(); 2741 SafeVMPtr ptrVM(this); 2742 if (ptrVM.isOk()) 2743 { 2744 alock.release(); 2745 VMR3Resume(ptrVM); 2746 alock.acquire(); 2747 } 2730 2748 } 2731 2749 else
Note:
See TracChangeset
for help on using the changeset viewer.