VirtualBox

Changeset 46097 in vbox for trunk


Ignore:
Timestamp:
May 15, 2013 1:11:39 PM (12 years ago)
Author:
vboxsync
Message:

ConsoleVRDPServer: do not stop VRDP server if a resize is in process

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r44528 r46097  
    126126     */
    127127    void SendUpdate (unsigned uScreenId, void *pvUpdate, uint32_t cbUpdate) const;
    128     void SendResize (void) const;
     128    void SendResize (void);
    129129    void SendUpdateBitmap (unsigned uScreenId, uint32_t x, uint32_t y, uint32_t w, uint32_t h) const;
    130130
     
    164164    HVRDESERVER mhServer;
    165165    int mServerInterfaceVersion;
     166
     167    int32_t volatile mcInResize; /* Do not Stop the server if this is not 0. */
    166168
    167169    static int loadVRDPLibrary (const char *pszLibraryName);
  • trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp

    r45680 r46097  
    13331333    mhServer = 0;
    13341334    mServerInterfaceVersion = 0;
     1335
     1336    mcInResize = 0;
    13351337
    13361338    m_fGuestWantsAbsolute = false;
     
    28192821        mhServer = 0;
    28202822
     2823        /* Workaround for VM process hangs on termination.
     2824         *
     2825         * Make sure that the server is not currently processing a resize.
     2826         * mhServer 0 will not allow to enter the server again.
     2827         * Wait until any current resize returns from the server.
     2828         */
     2829        if (mcInResize)
     2830        {
     2831            LogRel(("VRDP: waiting for resize %d\n", mcInResize));
     2832
     2833            int i = 0;
     2834            while (mcInResize && ++i < 100)
     2835            {
     2836                RTThreadSleep(10);
     2837            }
     2838        }
     2839
    28212840        if (mpEntryPoints && hServer)
    28222841        {
     
    36353654}
    36363655
    3637 void ConsoleVRDPServer::SendResize(void) const
     3656void ConsoleVRDPServer::SendResize(void)
    36383657{
    36393658    if (mpEntryPoints && mhServer)
    36403659    {
     3660        ++mcInResize;
    36413661        mpEntryPoints->VRDEResize(mhServer);
     3662        --mcInResize;
    36423663    }
    36433664}
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