VirtualBox

Changeset 75991 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Dec 5, 2018 8:14:57 PM (6 years ago)
Author:
vboxsync
Message:

HGCM: Don't send HGCMNOTIFYEVENT_RESET on shutdown. Messes up the /VirtualBox/VMInfo/ResetCounter in saved VMs.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/HGCM.cpp

    r75990 r75991  
    20662066class HGCMMsgMainReset: public HGCMMsgCore
    20672067{
     2068    public:
     2069        /** Set if this is actually a shutdown and not a VM reset. */
     2070        bool fForShutdown;
    20682071};
    20692072
     
    23072310                HGCMService::Reset();
    23082311
    2309                 HGCMService::BroadcastNotify(HGCMNOTIFYEVENT_RESET);
     2312                HGCMMsgMainReset *pMsg = (HGCMMsgMainReset *)pMsgCore;
     2313                if (!pMsg->fForShutdown)
     2314                    HGCMService::BroadcastNotify(HGCMNOTIFYEVENT_RESET);
    23102315            } break;
    23112316
     
    29092914#endif
    29102915
    2911 int HGCMHostReset(void)
     2916int HGCMHostReset(bool fForShutdown)
    29122917{
    29132918    LogFlowFunc(("\n"));
     
    29162921     */
    29172922
    2918     HGCMMsgCore *pMsg;
    2919     int rc = hgcmMsgAlloc(g_pHgcmThread, &pMsg, HGCM_MSG_RESET, hgcmMainMessageAlloc);
     2923    HGCMMsgCore *pMsgCore;
     2924    int rc = hgcmMsgAlloc(g_pHgcmThread, &pMsgCore, HGCM_MSG_RESET, hgcmMainMessageAlloc);
    29202925
    29212926    if (RT_SUCCESS(rc))
     2927    {
     2928        HGCMMsgMainReset *pMsg = (HGCMMsgMainReset *)pMsgCore;
     2929
     2930        pMsg->fForShutdown = fForShutdown;
     2931
    29222932        rc = hgcmMsgSend(pMsg);
     2933    }
    29232934
    29242935    LogFlowFunc(("rc = %Rrc\n", rc));
     
    29562967     */
    29572968
    2958     int rc = HGCMHostReset();
     2969    int rc = HGCMHostReset(true /*fForShutdown*/);
    29592970
    29602971    if (RT_SUCCESS(rc))
  • trunk/src/VBox/Main/src-client/VMMDevInterface.cpp

    r75990 r75991  
    827827    LogFlow(("VMMDev::drvReset: iInstance=%d\n", pDrvIns->iInstance));
    828828#ifdef VBOX_WITH_HGCM
    829     HGCMHostReset();
     829    HGCMHostReset(false /*fForShutdown*/);
    830830#endif
    831831}
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