VirtualBox

Changeset 20708 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jun 19, 2009 10:02:27 AM (16 years ago)
Author:
vboxsync
Message:

DrvIntNet,DrvTAP: Deregister statistics during destruction. (untested)

Location:
trunk/src/VBox/Devices/Network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvIntNet.cpp

    r19079 r20708  
    723723    if (EventSuspended != NIL_RTSEMEVENT)
    724724        RTSemEventDestroy(EventSuspended);
     725
     726    /*
     727     * Deregister statistics in case we're being detached.
     728     */
     729    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->pBuf->cbStatRecv);
     730    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->pBuf->cbStatSend);
     731    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->pBuf->cStatRecvs);
     732    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->pBuf->cStatSends);
     733    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->pBuf->cStatLost);
     734    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->pBuf->cStatYieldsNok);
     735#ifdef VBOX_WITH_STATISTICS
     736    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatReceive);
     737    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatTransmit);
     738#endif
    725739}
    726740
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r13840 r20708  
    864864    MMR3HeapFree(pThis->pszSetupApplication);
    865865    MMR3HeapFree(pThis->pszTerminateApplication);
     866
     867#ifdef VBOX_WITH_STATISTICS
     868    /*
     869     * Deregister statistics.
     870     */
     871    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatPktSent);
     872    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatPktSentBytes);
     873    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatPktRecv);
     874    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatPktRecvBytes);
     875    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatTransmit);
     876    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatReceive);
     877#endif /* VBOX_WITH_STATISTICS */
    866878}
    867879
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