VirtualBox

Changeset 8310 in vbox


Ignore:
Timestamp:
Apr 22, 2008 7:36:46 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30067
Message:

Main: Uninitialize remote sessions after the session state is set to Closed on the server to make sure they can be immediately reopened again for the same machine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r8170 r8310  
    74387438    }
    74397439
    7440     /* uninitialize all remote controls */
    7441     if (mData->mSession.mRemoteControls.size())
    7442     {
    7443         LogFlowThisFunc (("Closing remote sessions (%d):\n",
    7444                           mData->mSession.mRemoteControls.size()));
    7445 
    7446         Data::Session::RemoteControlList::iterator it =
    7447             mData->mSession.mRemoteControls.begin();
    7448         while (it != mData->mSession.mRemoteControls.end())
    7449         {
    7450             LogFlowThisFunc (("  Calling remoteControl->Uninitialize()...\n"));
    7451             HRESULT rc = (*it)->Uninitialize();
    7452             LogFlowThisFunc (("  remoteControl->Uninitialize() returned %08X\n", rc));
    7453             if (FAILED (rc))
    7454                 LogWarningThisFunc (("Forgot to close the remote session?\n"));
    7455             ++ it;
    7456         }
    7457         mData->mSession.mRemoteControls.clear();
    7458     }
    7459 
    74607440    /*
    74617441     *  An expected uninitialization can come only from #checkForDeath().
     
    74967476    mData->mSession.mState = SessionState_Closed;
    74977477    mData->mSession.mType.setNull();
     7478
     7479    /* uninitialize all remote controls (note that we do it after we set the
     7480     * session state to SessionState_Closed to make sure that uninitialized
     7481     * remote sessions can be immediately reopened for the same machine again
     7482     * once we fihish with uninit)*/
     7483    if (mData->mSession.mRemoteControls.size())
     7484    {
     7485        LogFlowThisFunc (("Closing remote sessions (%d):\n",
     7486                          mData->mSession.mRemoteControls.size()));
     7487
     7488        Data::Session::RemoteControlList::iterator it =
     7489            mData->mSession.mRemoteControls.begin();
     7490        while (it != mData->mSession.mRemoteControls.end())
     7491        {
     7492            LogFlowThisFunc (("  Calling remoteControl->Uninitialize()...\n"));
     7493            HRESULT rc = (*it)->Uninitialize();
     7494            LogFlowThisFunc (("  remoteControl->Uninitialize() returned %08X\n", rc));
     7495            if (FAILED (rc))
     7496                LogWarningThisFunc (("Forgot to close the remote session?\n"));
     7497            ++ it;
     7498        }
     7499        mData->mSession.mRemoteControls.clear();
     7500    }
    74987501
    74997502    /* close the interprocess semaphore before leaving the shared lock */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette