VirtualBox

Changeset 49127 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Oct 16, 2013 10:18:34 AM (11 years ago)
Author:
vboxsync
Message:

Main/NATNetworkImpl.cpp: do settings saving and event firing iff new value differs from old one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/NATNetworkImpl.cpp

    r49126 r49127  
    296296    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    297297    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     298   
     299    if (aName == mName)
     300        return S_OK;
     301
    298302    unconst(mName) = aName;
    299303
     
    327331    HRESULT rc = S_OK;
    328332    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     333   
     334    if (aEnabled == m->fEnabled)
     335        return S_OK;
     336
    329337    m->fEnabled = aEnabled;
    330338
     
    368376    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    369377    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     378   
     379    if (aIPv4NetworkCidr == m->IPv4NetworkCidr)
     380        return S_OK;
     381       
    370382    /* silently ignore network cidr update */
    371383    if (m->mapName2PortForwardRule4.empty())
     
    401413    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    402414    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     415
     416    if (aIPv6Enabled == m->fIPv6Enabled)
     417        return S_OK;
     418
    403419    m->fIPv6Enabled = aIPv6Enabled;
    404420
     
    436452    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    437453
     454    if (aIPv6Prefix == m->IPv6Prefix)
     455        return S_OK;
     456
    438457    /* silently ignore network cidr update */
    439458    if (m->mapName2PortForwardRule6.empty())
     
    469488    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    470489    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     490   
     491    if (aAdvertiseDefaultIPv6Route == m->fAdvertiseDefaultIPv6Route)
     492        return S_OK;
     493
    471494    m->fAdvertiseDefaultIPv6Route = aAdvertiseDefaultIPv6Route;
    472495
     
    499522    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    500523    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     524   
     525    if (aNeedDhcpServer == m->fNeedDhcpServer)
     526        return S_OK;
     527
    501528    m->fNeedDhcpServer = aNeedDhcpServer;
    502529
     
    628655    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    629656
     657    if (aLoopbackIp6 < 0)
     658        return E_INVALIDARG;
     659
     660    if (static_cast<uint32_t>(aLoopbackIp6) == m->u32LoopbackIp6)
     661        return S_OK;
     662   
    630663    m->u32LoopbackIp6 = aLoopbackIp6;
    631664
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