- Timestamp:
- Mar 6, 2015 5:29:44 AM (10 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostDnsService.cpp
r54631 r54662 87 87 { 88 88 Data(bool aThreaded) : 89 fInfoModified(false),90 89 fThreaded(aThreaded) 91 90 {} … … 93 92 std::vector<PCHostDnsMonitorProxy> proxies; 94 93 HostDnsInformation info; 95 bool fInfoModified;96 94 const bool fThreaded; 97 95 RTTHREAD hMonitoringThread; … … 198 196 } 199 197 200 void HostDnsMonitor::notifyAll() const201 {202 ALock l(this);203 if (m->fInfoModified)204 {205 m->fInfoModified = false;206 std::vector<PCHostDnsMonitorProxy>::const_iterator it;207 for (it = m->proxies.begin(); it != m->proxies.end(); ++it)208 (*it)->notify();209 }210 }211 212 198 void HostDnsMonitor::setInfo(const HostDnsInformation &info) 213 199 { 214 200 ALock l(this); 215 // Check for actual modifications, as the Windows specific code seems to 216 // often set the same information as before, without any change to the217 // previous state. Here we have the previous state, so make sure we don't218 // ever tell our clients about unchanged info. 219 if (!info.equals(m->info))220 { 221 m->info = info;222 m->fInfoModified = true;223 }201 202 if (info.equals(m->info)) 203 return; 204 205 m->info = info; 206 207 std::vector<PCHostDnsMonitorProxy>::const_iterator it; 208 for (it = m->proxies.begin(); it != m->proxies.end(); ++it) 209 (*it)->notify(); 224 210 } 225 211 -
trunk/src/VBox/Main/src-server/HostDnsService.h
r54302 r54662 84 84 virtual ~HostDnsMonitor(); 85 85 86 void notifyAll() const;87 86 void setInfo(const HostDnsInformation &); 88 87 -
trunk/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp
r53122 r54662 79 79 ALock l(pThis); 80 80 pThis->updateInfo(); 81 pThis->notifyAll();82 81 } 83 82 -
trunk/src/VBox/Main/src-server/linux/HostDnsServiceLinux.cpp
r52617 r54662 153 153 { 154 154 readResolvConf(); 155 /* notifyAll() takes required locks */156 notifyAll();157 155 } 158 156 else if (combo.e.mask & IN_DELETE_SELF) … … 214 212 /* Notify our listeners */ 215 213 readResolvConf(); 216 notifyAll();217 218 214 } 219 215 } -
trunk/src/VBox/Main/src-server/win/HostDnsServiceWin.cpp
r53624 r54662 157 157 { 158 158 updateInfo(); 159 notifyAll();160 159 161 160 ResetEvent(m->haDataEvent[DATA_DNS_UPDATE_EVENT]);
Note:
See TracChangeset
for help on using the changeset viewer.