VirtualBox

Changeset 29363 in vbox


Ignore:
Timestamp:
May 11, 2010 3:12:07 PM (15 years ago)
Author:
vboxsync
Message:

Added 'restart' parameter to OnVRDPServerChange notification.

Location:
trunk/src/VBox/Main
Files:
7 edited

Legend:

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

    r29326 r29363  
    38783878 * @note Locks this object for writing.
    38793879 */
    3880 HRESULT Console::onVRDPServerChange()
     3880HRESULT Console::onVRDPServerChange(BOOL aRestart)
    38813881{
    38823882    AutoCaller autoCaller(this);
     
    38993899        ComAssertComRCRetRC(rc);
    39003900
    3901         /* VRDP server may call this Console object back from other threads (VRDP INPUT or OUTPUT). */
    3902         alock.leave();
    3903 
    3904         if (vrdpEnabled)
    3905         {
    3906             // If there was no VRDP server started the 'stop' will do nothing.
    3907             // However if a server was started and this notification was called,
    3908             // we have to restart the server.
    3909             mConsoleVRDPServer->Stop();
    3910 
    3911             if (RT_FAILURE(mConsoleVRDPServer->Launch()))
     3901        if (aRestart)
     3902        {
     3903            /* VRDP server may call this Console object back from other threads (VRDP INPUT or OUTPUT). */
     3904            alock.leave();
     3905
     3906            if (vrdpEnabled)
    39123907            {
    3913                 rc = E_FAIL;
     3908                // If there was no VRDP server started the 'stop' will do nothing.
     3909                // However if a server was started and this notification was called,
     3910                // we have to restart the server.
     3911                mConsoleVRDPServer->Stop();
     3912
     3913                if (RT_FAILURE(mConsoleVRDPServer->Launch()))
     3914                {
     3915                    rc = E_FAIL;
     3916                }
     3917                else
     3918                {
     3919                    mConsoleVRDPServer->EnableConnections();
     3920                }
    39143921            }
    39153922            else
    39163923            {
    3917                 mConsoleVRDPServer->EnableConnections();
     3924                mConsoleVRDPServer->Stop();
    39183925            }
    3919         }
    3920         else
    3921         {
    3922             mConsoleVRDPServer->Stop();
    3923         }
    3924 
    3925         alock.enter();
     3926
     3927            alock.enter();
     3928        }
    39263929    }
    39273930
  • trunk/src/VBox/Main/MachineImpl.cpp

    r29354 r29363  
    89298929
    89308930        if (flModifications & IsModified_VRDPServer)
    8931             that->onVRDPServerChange();
     8931            that->onVRDPServerChange(/* aRestart */ TRUE);
    89328932        if (flModifications & IsModified_USB)
    89338933            that->onUSBControllerChange();
     
    1056510565 *  @note Locks this object for reading.
    1056610566 */
    10567 HRESULT SessionMachine::onVRDPServerChange()
     10567HRESULT SessionMachine::onVRDPServerChange(BOOL aRestart)
    1056810568{
    1056910569    LogFlowThisFunc(("\n"));
     
    1058210582        return S_OK;
    1058310583
    10584     return directControl->OnVRDPServerChange();
     10584    return directControl->OnVRDPServerChange(aRestart);
    1058510585}
    1058610586
  • trunk/src/VBox/Main/SessionImpl.cpp

    r28835 r29363  
    582582}
    583583
    584 STDMETHODIMP Session::OnVRDPServerChange()
     584STDMETHODIMP Session::OnVRDPServerChange(BOOL aRestart)
    585585{
    586586    LogFlowThisFunc(("\n"));
     
    593593    AssertReturn(mType == SessionType_Direct, VBOX_E_INVALID_OBJECT_STATE);
    594594
    595     return mConsole->onVRDPServerChange();
     595    return mConsole->onVRDPServerChange(aRestart);
    596596}
    597597
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r29354 r29363  
    1314813148  <interface
    1314913149     name="IInternalSessionControl" extends="$unknown"
    13150      uuid="cc8d63a0-568e-45dd-9bf6-6354049ece1e"
     13150     uuid="ab161f72-e4b3-44e6-a919-2256474bda66"
    1315113151     internal="yes"
    1315213152     wsmap="suppress"
     
    1334113341
    1334213342      </desc>
     13343      <param name="restart" type="boolean" dir="in">
     13344        <desc>Flag whether the server must be restarted</desc>
     13345      </param>
    1334313346    </method>
    1334413347
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r29224 r29363  
    175175    HRESULT onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce);
    176176    HRESULT onCPUChange(ULONG aCPU, BOOL aRemove);
    177     HRESULT onVRDPServerChange();
     177    HRESULT onVRDPServerChange(BOOL aRestart);
    178178    HRESULT onUSBControllerChange();
    179179    HRESULT onSharedFolderChange(BOOL aGlobal);
  • trunk/src/VBox/Main/include/MachineImpl.h

    r29354 r29363  
    605605    virtual HRESULT onSerialPortChange(ISerialPort * /* serialPort */) { return S_OK; }
    606606    virtual HRESULT onParallelPortChange(IParallelPort * /* parallelPort */) { return S_OK; }
    607     virtual HRESULT onVRDPServerChange() { return S_OK; }
     607    virtual HRESULT onVRDPServerChange(BOOL /* aRestart */) { return S_OK; }
    608608    virtual HRESULT onUSBControllerChange() { return S_OK; }
    609609    virtual HRESULT onStorageControllerChange() { return S_OK; }
     
    943943    HRESULT onParallelPortChange(IParallelPort *parallelPort);
    944944    HRESULT onCPUChange(ULONG aCPU, BOOL aRemove);
    945     HRESULT onVRDPServerChange();
     945    HRESULT onVRDPServerChange(BOOL aRestart);
    946946    HRESULT onUSBControllerChange();
    947947    HRESULT onUSBDeviceAttach(IUSBDevice *aDevice,
  • trunk/src/VBox/Main/include/SessionImpl.h

    r28835 r29363  
    9393    STDMETHOD(OnMediumChange)(IMediumAttachment *aMediumAttachment, BOOL aForce);
    9494    STDMETHOD(OnCPUChange)(ULONG aCPU, BOOL aRemove);
    95     STDMETHOD(OnVRDPServerChange)();
     95    STDMETHOD(OnVRDPServerChange)(BOOL aRestart);
    9696    STDMETHOD(OnUSBControllerChange)();
    9797    STDMETHOD(OnSharedFolderChange)(BOOL aGlobal);
Note: See TracChangeset for help on using the changeset viewer.

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