Changeset 78030 in vbox
- Timestamp:
- Apr 5, 2019 7:08:10 PM (6 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostDnsService.h
r78014 r78030 154 154 private: 155 155 156 HRESULT updateInfo();156 int updateInfo(void); 157 157 static void hostDnsServiceStoreCallback(void *store, void *arrayRef, void *info); 158 158 struct Data; -
trunk/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp
r78013 r78030 66 66 HRESULT HostDnsServiceDarwin::init(HostDnsMonitorProxy *pProxy) 67 67 { 68 HRESULT hrc = HostDnsServiceBase::init(pProxy);69 AssertComRCReturn(hrc, hrc);70 71 68 SCDynamicStoreContext ctx; 72 69 RT_ZERO(ctx); … … 96 93 CFRunLoopAddSource(m->m_RunLoopRef, m->m_SourceStop, kCFRunLoopCommonModes); 97 94 98 return updateInfo(); 95 HRESULT hrc = HostDnsServiceBase::init(pProxy); 96 return hrc; 99 97 } 100 98 … … 143 141 { 144 142 CFRelease(m->m_DnsWatcher); 145 return E_OUTOFMEMORY;143 return VERR_NO_MEMORY; 146 144 } 147 145 … … 153 151 onMonitorThreadInitDone(); 154 152 153 /* Trigger initial update. */ 154 int rc = updateInfo(); 155 AssertRC(rc); /* Not fatal in release builds. */ 156 155 157 while (!ASMAtomicReadBool(&m->m_fStop)) 156 158 { … … 164 166 } 165 167 166 HRESULTHostDnsServiceDarwin::updateInfo(void)168 int HostDnsServiceDarwin::updateInfo(void) 167 169 { 168 170 CFPropertyListRef propertyRef = SCDynamicStoreCopyValue(m->m_store, kStateNetworkGlobalDNSKey); … … 186 188 187 189 if (!propertyRef) 188 return S_OK;190 return VINF_SUCCESS; 189 191 190 192 HostDnsInformation info; … … 245 247 setInfo(info); 246 248 247 return S_OK; 248 } 249 250 void HostDnsServiceDarwin::hostDnsServiceStoreCallback(void *, void *, void *info) 251 { 252 HostDnsServiceDarwin *pThis = (HostDnsServiceDarwin *)info; 249 return VINF_SUCCESS; 250 } 251 252 void HostDnsServiceDarwin::hostDnsServiceStoreCallback(void *, void *, void *pInfo) 253 { 254 HostDnsServiceDarwin *pThis = (HostDnsServiceDarwin *)pInfo; 255 AssertPtrReturnVoid(pThis); 253 256 254 257 RTCLock grab(pThis->m_LockMtx); … … 258 261 void HostDnsServiceDarwin::Data::performShutdownCallback(void *pInfo) 259 262 { 260 HostDnsServiceDarwin ::Data *pThis = static_cast<HostDnsServiceDarwin::Data *>(pInfo);263 HostDnsServiceDarwin *pThis = (HostDnsServiceDarwin *)pInfo; 261 264 AssertPtrReturnVoid(pThis); 262 pThis->m_fStop = true; 263 } 264 265 266 AssertPtrReturnVoid(pThis->m); 267 ASMAtomicXchgBool(&pThis->m->m_fStop, true); 268 } 269
Note:
See TracChangeset
for help on using the changeset viewer.