VirtualBox

Changeset 5272 in vbox for trunk


Ignore:
Timestamp:
Oct 12, 2007 6:02:48 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
25266
Message:

Shutdown HGCM services before the VM is powered down.

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

Legend:

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

    r5150 r5272  
    353353     */
    354354    uninitDependentChildren();
    355 
    356     /* This should be the first, since this may cause detaching remote USB devices. */
    357     if (mConsoleVRDPServer)
    358     {
    359         mConsoleVRDPServer->Stop ();
    360         /* Do not delete the mConsoleVRDPServer yet, it could be called
    361          * since the VM may be not powered done at the moment.
    362          */
    363     }
    364355
    365356    /* power down the VM if necessary */
     
    39003891    /*
    39013892     *  Stop the VRDP server to prevent new clients connection while VM is being powered off.
    3902      *  (When called from uninit mConsoleVRDPServer is already destroyed.)
    39033893     */
    39043894    if (mConsoleVRDPServer)
     
    39133903        alock.enter();
    39143904    }
     3905   
     3906   
     3907#ifdef VBOX_HGCM
     3908    /*
     3909     *  Shutdown HGCM services before stopping the guest, because they might need a cleanup.
     3910     */
     3911    if (mVMMDev)
     3912    {
     3913        LogFlowThisFunc (("Shutdown HGCM...\n"));
     3914
     3915        /* Leave the lock. */
     3916        alock.leave();
     3917
     3918        mVMMDev->hgcmShutdown ();
     3919
     3920        alock.enter();
     3921    }
     3922#endif /* VBOX_HGCM */
    39153923
    39163924    /* First, wait for all mpVM callers to finish their work if necessary */
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r4685 r5272  
    9191VMMDev::~VMMDev()
    9292{
    93 #ifdef VBOX_HGCM
    94     HGCMHostShutdown ();
    95 #endif /* VBOX_HGCM */
    9693    RTSemEventDestroy (mCredentialsEvent);
    9794    if (mpDrv)
     
    568565    return HGCMHostCall (pszServiceName, u32Function, cParms, paParms);
    569566}
     567
     568void VMMDev::hgcmShutdown (void)
     569{
     570    HGCMHostShutdown ();
     571}
     572
    570573#endif /* HGCM */
    571574
  • trunk/src/VBox/Main/include/VMMDev.h

    r4071 r5272  
    5151    int hgcmLoadService (const char *pszServiceName, const char *pszServiceLibrary);
    5252    int hgcmHostCall (const char *pszServiceName, uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms);
     53    void hgcmShutdown (void);
    5354
    5455private:
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