Changeset 57134 in vbox
- Timestamp:
- Jul 30, 2015 5:56:59 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101875
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/MachineImpl.h
r56820 r57134 566 566 bool i_isSessionOpen(ComObjPtr<SessionMachine> &aMachine, 567 567 ComPtr<IInternalSessionControl> *aControl = NULL, 568 bool aRequireVM = false, 568 569 bool aAllowClosing = false); 569 570 bool i_isSessionSpawning(); … … 571 572 bool i_isSessionOpenOrClosing(ComObjPtr<SessionMachine> &aMachine, 572 573 ComPtr<IInternalSessionControl> *aControl = NULL) 573 { return i_isSessionOpen(aMachine, aControl, true /* aAllowClosing */); } 574 { return i_isSessionOpen(aMachine, aControl, false /* aRequireVM */, true /* aAllowClosing */); } 575 576 bool i_isSessionOpenVM(ComObjPtr<SessionMachine> &aMachine, 577 ComPtr<IInternalSessionControl> *aControl = NULL) 578 { return i_isSessionOpen(aMachine, aControl, true /* aRequireVM */, false /* aAllowClosing */); } 574 579 575 580 bool i_checkForSpawnFailure(); -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r56994 r57134 7747 7747 * @param aMachine Session machine object. 7748 7748 * @param aControl Direct session control object (optional). 7749 * @param aRequireVM If true then only allow VM sessions. 7749 7750 * @param aAllowClosing If true then additionally a session which is currently 7750 7751 * being closed will also be allowed. … … 7754 7755 bool Machine::i_isSessionOpen(ComObjPtr<SessionMachine> &aMachine, 7755 7756 ComPtr<IInternalSessionControl> *aControl /*= NULL*/, 7757 bool aRequireVM /*= false*/, 7756 7758 bool aAllowClosing /*= false*/) 7757 7759 { … … 7766 7768 7767 7769 if ( ( mData->mSession.mState == SessionState_Locked 7768 && mData->mSession.mLockType == LockType_VM)7770 && (!aRequireVM || mData->mSession.mLockType == LockType_VM)) 7769 7771 || (aAllowClosing && mData->mSession.mState == SessionState_Unlocking) 7770 7772 ) -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r56398 r57134 3036 3036 3037 3037 /** 3038 * Returns the list of opened machines (machines having direct sessions opened3039 * by client processes) and optionally the list of direct session controls.3038 * Returns the list of opened machines (machines having VM sessions opened, 3039 * ignoring other sessions) and optionally the list of direct session controls. 3040 3040 * 3041 3041 * @param aMachines Where to put opened machines (will be empty if none). … … 3069 3069 ComObjPtr<SessionMachine> sm; 3070 3070 ComPtr<IInternalSessionControl> ctl; 3071 if ((*it)->i_isSessionOpen (sm, &ctl))3071 if ((*it)->i_isSessionOpenVM(sm, &ctl)) 3072 3072 { 3073 3073 aMachines.push_back(sm);
Note:
See TracChangeset
for help on using the changeset viewer.