Changeset 47106 in vbox
- Timestamp:
- Jul 12, 2013 9:36:54 AM (12 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ConsoleImpl.h
r46775 r47106 726 726 727 727 ConsoleVRDPServer * const mConsoleVRDPServer; 728 bool mfVRDEChangeInProcess; 729 bool mfVRDEChangePending; 728 730 729 731 const ComObjPtr<Guest> mGuest; -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r46815 r47106 370 370 : mSavedStateDataLoaded(false) 371 371 , mConsoleVRDPServer(NULL) 372 , mfVRDEChangeInProcess(false) 373 , mfVRDEChangePending(false) 372 374 , mpUVM(NULL) 373 375 , mVMCallers(0) … … 4846 4848 if (ptrVM.isOk()) 4847 4849 { 4848 if ( mVRDEServer 4849 && ( mMachineState == MachineState_Running 4850 || mMachineState == MachineState_Teleporting 4851 || mMachineState == MachineState_LiveSnapshotting 4852 || mMachineState == MachineState_Paused 4853 ) 4854 ) 4855 { 4856 BOOL vrdpEnabled = FALSE; 4857 4858 rc = mVRDEServer->COMGETTER(Enabled)(&vrdpEnabled); 4859 ComAssertComRCRetRC(rc); 4860 4861 if (aRestart) 4862 { 4863 /* VRDP server may call this Console object back from other threads (VRDP INPUT or OUTPUT). */ 4864 alock.release(); 4865 4866 if (vrdpEnabled) 4850 /* Serialize. */ 4851 if (mfVRDEChangeInProcess) 4852 mfVRDEChangePending = true; 4853 else 4854 { 4855 do { 4856 mfVRDEChangeInProcess = true; 4857 mfVRDEChangePending = false; 4858 4859 if ( mVRDEServer 4860 && ( mMachineState == MachineState_Running 4861 || mMachineState == MachineState_Teleporting 4862 || mMachineState == MachineState_LiveSnapshotting 4863 || mMachineState == MachineState_Paused 4864 ) 4865 ) 4867 4866 { 4868 // If there was no VRDP server started the 'stop' will do nothing. 4869 // However if a server was started and this notification was called, 4870 // we have to restart the server. 4871 mConsoleVRDPServer->Stop(); 4872 4873 if (RT_FAILURE(mConsoleVRDPServer->Launch())) 4874 rc = E_FAIL; 4875 else 4876 mConsoleVRDPServer->EnableConnections(); 4867 BOOL vrdpEnabled = FALSE; 4868 4869 rc = mVRDEServer->COMGETTER(Enabled)(&vrdpEnabled); 4870 ComAssertComRCRetRC(rc); 4871 4872 if (aRestart) 4873 { 4874 /* VRDP server may call this Console object back from other threads (VRDP INPUT or OUTPUT). */ 4875 alock.release(); 4876 4877 if (vrdpEnabled) 4878 { 4879 // If there was no VRDP server started the 'stop' will do nothing. 4880 // However if a server was started and this notification was called, 4881 // we have to restart the server. 4882 mConsoleVRDPServer->Stop(); 4883 4884 if (RT_FAILURE(mConsoleVRDPServer->Launch())) 4885 rc = E_FAIL; 4886 else 4887 mConsoleVRDPServer->EnableConnections(); 4888 } 4889 else 4890 mConsoleVRDPServer->Stop(); 4891 4892 alock.acquire(); 4893 } 4877 4894 } 4878 4895 else 4879 mConsoleVRDPServer->Stop(); 4880 4881 alock.acquire(); 4882 } 4883 } 4884 else 4885 rc = setInvalidMachineStateError(); 4896 rc = setInvalidMachineStateError(); 4897 4898 mfVRDEChangeInProcess = false; 4899 } while (mfVRDEChangePending && SUCCEEDED(rc)); 4900 } 4901 4886 4902 ptrVM.release(); 4887 4903 }
Note:
See TracChangeset
for help on using the changeset viewer.