VirtualBox

Changeset 48107 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Aug 27, 2013 10:15:13 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88483
Message:

NATNetwork windows build fix. Fixed memory leak in recalculateIpv4AddressAssignments due to confusing string handling and simplified the code there a little (~20 lines shorter). Fixed indentation and some other nits.

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

Legend:

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

    r48098 r48107  
    11/* $Id$ */
    2 
    32/** @file
    4  *
    5  * VirtualBox COM class implementation
     3 * INATNetwork implementation header, lives in VBoxSVC.
    64 */
    75
     
    129127
    130128private:
    131     int RecalculateIpv4AddressAssignments();
     129    int recalculateIpv4AddressAssignments();
    132130    int findFirstAvailableOffset(uint32_t *);
    133131
     
    145143};
    146144
    147 #endif // ____H_H_NATNETWORKIMPL
     145#endif // !____H_H_NATNETWORKIMPL
  • trunk/src/VBox/Main/include/NetworkServiceRunner.h

    r47018 r48107  
    11/* $Id$ */
    22/** @file
    3  * VirtualBox Main - interface for VBox DHCP server
     3 * VirtualBox Main - interface for VBox DHCP server.
    44 */
    55
     
    1515 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1616 */
     17
    1718#include <iprt/err.h>
    1819#include <iprt/types.h>
     
    3233    NETCFG_VERBOSE,
    3334    NETCFG_NOTOPT_MAXVAL
    34 }NETCFG;
     35} NETCFG;
    3536
    3637#define TRUNKTYPE_WHATEVER "whatever"
     
    4243{
    4344public:
    44     NetworkServiceRunner(const char *aProcName):
    45       mProcName(aProcName),
    46       mProcess(NIL_RTPROCESS)
     45    NetworkServiceRunner(const char *aProcName)
     46        : mProcName(aProcName)
     47        , mProcess(NIL_RTPROCESS)
    4748    {
    48         memset(mOptionEnabled, 0, sizeof(mOptionEnabled));
     49        RT_ZERO(mOptionEnabled);
    4950    };
    50     ~NetworkServiceRunner() { stop(); /* don't leave abandoned servers */}
     51    ~NetworkServiceRunner()
     52    {
     53        stop(); /* don't leave abandoned servers */
     54    }
    5155
    5256    int setOption(NETCFG opt, const char *val, bool enabled)
     
    7882    RTPROCESS mProcess;
    7983};
     84
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