Changeset 13696 in vbox
- Timestamp:
- Oct 30, 2008 9:58:59 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38661
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r13638 r13696 3834 3834 #if defined (RT_OS_WINDOWS) 3835 3835 bool Machine::isSessionOpen (ComObjPtr <SessionMachine> &aMachine, 3836 HANDLE *aIPCSem /*= NULL*/) 3836 HANDLE *aIPCSem /*= NULL*/, 3837 bool aAllowClosing /*= false*/) 3837 3838 #elif defined (RT_OS_OS2) 3838 3839 bool Machine::isSessionOpen (ComObjPtr <SessionMachine> &aMachine, 3839 HMTX *aIPCSem /*= NULL*/); 3840 HMTX *aIPCSem /*= NULL*/, 3841 bool aAllowClosing /*= false*/); 3840 3842 #else 3841 bool Machine::isSessionOpen (ComObjPtr <SessionMachine> &aMachine) 3843 bool Machine::isSessionOpen (ComObjPtr <SessionMachine> &aMachine, 3844 bool aAllowClosing /*= false*/) 3842 3845 #endif 3843 3846 { … … 3851 3854 AutoReadLock alock (this); 3852 3855 3853 if (mData->mSession.mState == SessionState_Open) 3856 if (mData->mSession.mState == SessionState_Open || 3857 (aAllowClosing && mData->mSession.mState == SessionState_Closing)) 3854 3858 { 3855 3859 AssertReturn (!mData->mSession.mMachine.isNull(), false); -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r13580 r13696 4071 4071 ComObjPtr <SessionMachine> sm; 4072 4072 HANDLE ipcSem; 4073 if ((*it)->isSessionOpen (sm, &ipcSem))4073 if ((*it)->isSessionOpenOrClosing (sm, &ipcSem)) 4074 4074 { 4075 4075 machines.push_back (sm); … … 4263 4263 ComObjPtr <SessionMachine> sm; 4264 4264 HMTX ipcSem; 4265 if ((*it)->isSessionOpen (sm, &ipcSem))4265 if ((*it)->isSessionOpenOrClosing (sm, &ipcSem)) 4266 4266 { 4267 4267 machines.push_back (sm); … … 4356 4356 { 4357 4357 ComObjPtr <SessionMachine> sm; 4358 if ((*it)->isSessionOpen (sm))4358 if ((*it)->isSessionOpenOrClosing (sm)) 4359 4359 machines.push_back (sm); 4360 4360 } -
trunk/src/VBox/Main/include/MachineImpl.h
r13580 r13696 634 634 635 635 #if defined (RT_OS_WINDOWS) 636 636 637 bool isSessionOpen (ComObjPtr <SessionMachine> &aMachine, 637 HANDLE *aIPCSem = NULL );638 HANDLE *aIPCSem = NULL, bool aAllowClosing = false); 638 639 bool isSessionSpawning (RTPROCESS *aPID = NULL); 640 641 bool isSessionOpenOrClosing (ComObjPtr <SessionMachine> &aMachine, 642 HANDLE *aIPCSem = NULL) 643 { return isSessionOpen (aMachine, aIPCSem, true /* aAllowClosing */); } 644 639 645 #elif defined (RT_OS_OS2) 646 640 647 bool isSessionOpen (ComObjPtr <SessionMachine> &aMachine, 641 HMTX *aIPCSem = NULL); 648 HMTX *aIPCSem = NULL, bool aAllowClosing = false); 649 642 650 bool isSessionSpawning (RTPROCESS *aPID = NULL); 651 652 bool isSessionOpenOrClosing (ComObjPtr <SessionMachine> &aMachine, 653 HMTX *aIPCSem = NULL) 654 { return isSessionOpen (aMachine, aIPCSem, true /* aAllowClosing */); } 655 643 656 #else 644 bool isSessionOpen (ComObjPtr <SessionMachine> &aMachine); 657 658 bool isSessionOpen (ComObjPtr <SessionMachine> &aMachine, 659 bool aAllowClosing = false); 645 660 bool isSessionSpawning(); 661 662 bool isSessionOpenOrClosing (ComObjPtr <SessionMachine> &aMachine) 663 { return isSessionOpen (aMachine, true /* aAllowClosing */); } 664 646 665 #endif 647 666 … … 942 961 Bstr mIPCSemName; 943 962 friend bool Machine::isSessionOpen (ComObjPtr <SessionMachine> &aMachine, 944 HANDLE *aIPCSem );963 HANDLE *aIPCSem, bool aAllowClosing); 945 964 #elif defined (RT_OS_OS2) 946 965 HMTX mIPCSem; 947 966 Bstr mIPCSemName; 948 967 friend bool Machine::isSessionOpen (ComObjPtr <SessionMachine> &aMachine, 949 HMTX *aIPCSem );968 HMTX *aIPCSem, bool aAllowClosing); 950 969 #elif defined (VBOX_WITH_SYS_V_IPC_SESSION_WATCHER) 951 970 int mIPCSem;
Note:
See TracChangeset
for help on using the changeset viewer.