VirtualBox

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


Ignore:
Timestamp:
Jun 8, 2018 10:19:45 AM (7 years ago)
Author:
vboxsync
Message:

HostDnsService: there's no point to delay a call to updateInfo().

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

Legend:

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

    r72439 r72480  
    102102      : virtualbox(aParent),
    103103        monitor(aMonitor),
    104         info(NULL),
    105         fModified(true)
     104        info(NULL)
    106105    {}
    107106
     
    118117    HostDnsMonitor *monitor;
    119118    HostDnsInformation *info;
    120     bool fModified;
    121119};
    122120
     
    329327
    330328
    331 void HostDnsMonitorProxy::notify() const
     329void HostDnsMonitorProxy::notify()
    332330{
    333331    LogRel(("HostDnsMonitorProxy::notify\n"));
    334     m->fModified = true;
     332    updateInfo();
    335333    m->virtualbox->i_onHostNameResolutionConfigurationChange();
    336334}
     
    340338    AssertReturn(m && m->info, E_FAIL);
    341339    RTCLock grab(m_LockMtx);
    342 
    343     if (m->fModified)
    344         updateInfo();
    345340
    346341    LogRel(("HostDnsMonitorProxy::GetNameServers:\n"));
     
    357352    RTCLock grab(m_LockMtx);
    358353
    359     if (m->fModified)
    360         updateInfo();
    361 
    362354    LogRel(("HostDnsMonitorProxy::GetDomainName: %s\n",
    363355            m->info->domain.empty() ? "no domain set" : m->info->domain.c_str()));
     
    372364    AssertReturn(m && m->info, E_FAIL);
    373365    RTCLock grab(m_LockMtx);
    374 
    375     if (m->fModified)
    376         updateInfo();
    377366
    378367    LogRel(("HostDnsMonitorProxy::GetSearchStrings:\n"));
     
    397386void HostDnsMonitorProxy::updateInfo()
    398387{
     388    RTCLock grab(m_LockMtx);
     389
    399390    HostDnsInformation *info = new HostDnsInformation(m->monitor->getInfo());
    400391    HostDnsInformation *old = m->info;
     
    405396        delete old;
    406397    }
    407 
    408     m->fModified = false;
    409398}
    410399
  • trunk/src/VBox/Main/src-server/HostDnsService.h

    r72439 r72480  
    9696    ~HostDnsMonitorProxy();
    9797    void init(VirtualBox *virtualbox);
    98     void notify() const;
     98    void notify();
    9999
    100100    VirtualBox *getVirtualBox() const;
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