Changeset 26232 in vbox
- Timestamp:
- Feb 4, 2010 1:35:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r26200 r26232 5019 5019 ComAssertRet (!mData->mSession.mDirectControl.isNull(), E_FAIL); 5020 5020 5021 /* 5022 * Get the console from the direct session (note that we don't leave the 5023 * lock here because GetRemoteConsole must not call us back). 5024 */ 5025 ComPtr<IConsole> console; 5026 HRESULT rc = mData->mSession.mDirectControl-> 5027 GetRemoteConsole (console.asOutParam()); 5028 if (FAILED(rc)) 5029 { 5030 /* The failure may occur w/o any error info (from RPC), so provide one */ 5031 return setError(VBOX_E_VM_ERROR, 5032 tr("Failed to get a console object from the direct session (%Rrc)"), 5033 rc); 5034 } 5035 5036 ComAssertRet (!console.isNull(), E_FAIL); 5037 5038 ComObjPtr<SessionMachine> sessionMachine = mData->mSession.mMachine; 5039 AssertReturn(!sessionMachine.isNull(), E_FAIL); 5021 // copy member variables before leaving lock 5022 ComPtr<IInternalSessionControl> pDirectControl = mData->mSession.mDirectControl; 5023 ComObjPtr<SessionMachine> pSessionMachine = mData->mSession.mMachine; 5024 AssertReturn(!pSessionMachine.isNull(), E_FAIL); 5040 5025 5041 5026 /* … … 5047 5032 alock.leave(); 5048 5033 5034 // get the console from the direct session (this is a remote call) 5035 ComPtr<IConsole> pConsole; 5036 LogFlowThisFunc(("Calling GetRemoteConsole()...\n")); 5037 HRESULT rc = pDirectControl->GetRemoteConsole(pConsole.asOutParam()); 5038 LogFlowThisFunc(("GetRemoteConsole() returned %08X\n", rc)); 5039 if (FAILED (rc)) 5040 /* The failure may occur w/o any error info (from RPC), so provide one */ 5041 return setError (VBOX_E_VM_ERROR, 5042 tr ("Failed to get a console object from the direct session (%Rrc)"), rc); 5043 5044 ComAssertRet(!pConsole.isNull(), E_FAIL); 5045 5049 5046 /* attach the remote session to the machine */ 5050 5047 LogFlowThisFunc(("Calling AssignRemoteMachine()...\n")); 5051 rc = aControl->AssignRemoteMachine (sessionMachine, console);5048 rc = aControl->AssignRemoteMachine(pSessionMachine, pConsole); 5052 5049 LogFlowThisFunc(("AssignRemoteMachine() returned %08X\n", rc)); 5053 5050 … … 5071 5068 5072 5069 /* store the control in the list */ 5073 mData->mSession.mRemoteControls.push_back 5070 mData->mSession.mRemoteControls.push_back(aControl); 5074 5071 5075 5072 LogFlowThisFuncLeave();
Note:
See TracChangeset
for help on using the changeset viewer.