VirtualBox

Changeset 32090 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Aug 30, 2010 12:40:26 PM (14 years ago)
Author:
vboxsync
Message:

FT cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/FTM.cpp

    r32089 r32090  
    137137{
    138138    if (pVM->ftm.s.master.hShutdownEvent != NIL_RTSEMEVENT)
     139    {
    139140        RTSemEventDestroy(pVM->ftm.s.master.hShutdownEvent);
     141        pVM->ftm.s.master.hShutdownEvent = NIL_RTSEMEVENT;
     142    }
    140143    if (pVM->ftm.s.hSocket != NIL_RTSOCKET)
     144    {
    141145        RTTcpClientClose(pVM->ftm.s.hSocket);
     146        pVM->ftm.s.hSocket = NIL_RTSOCKET;
     147    }
    142148    if (pVM->ftm.s.standby.hServer)
     149    {
    143150        RTTcpServerDestroy(pVM->ftm.s.standby.hServer);
     151        pVM->ftm.s.standby.hServer = NULL;
     152    }
    144153    if (pVM->ftm.s.pszAddress)
    145154        RTMemFree(pVM->ftm.s.pszAddress);
    146155    if (pVM->ftm.s.pszPassword)
    147156        RTMemFree(pVM->ftm.s.pszPassword);
     157
     158    pVM->ftm.s.pszAddress  = NULL;
     159    pVM->ftm.s.pszPassword = NULL;
    148160
    149161    PDMR3CritSectDelete(&pVM->ftm.s.CritSect);
     
    987999        /** @todo deal with the exit code to check if we should activate this standby VM. */
    9881000
    989         RTTcpServerDestroy(pVM->ftm.s.standby.hServer);
    990         pVM->ftm.s.standby.hServer = NULL;
     1001        if (pVM->ftm.s.standby.hServer)
     1002        {
     1003            RTTcpServerDestroy(pVM->ftm.s.standby.hServer);
     1004            pVM->ftm.s.standby.hServer = NULL;
     1005        }
     1006        if (rc == VERR_TCP_SERVER_SHUTDOWN)
     1007            rc = VINF_SUCCESS;  /* ignore this error; the standby process was cancelled. */
    9911008    }
    9921009    return rc;
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