Changeset 78004 in vbox
- Timestamp:
- Apr 3, 2019 4:08:42 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp
r78000 r78004 64 64 } 65 65 66 void HostDnsServiceDarwin::hostDnsServiceStoreCallback(void *, void *, void *info)67 {68 HostDnsServiceDarwin *pThis = (HostDnsServiceDarwin *)info;69 70 RTCLock grab(pThis->m_LockMtx);71 pThis->updateInfo();72 }73 74 75 66 HRESULT HostDnsServiceDarwin::init(HostDnsMonitorProxy *pProxy) 76 67 { … … 177 168 HRESULT HostDnsServiceDarwin::updateInfo(void) 178 169 { 179 CFPropertyListRef propertyRef = SCDynamicStoreCopyValue(m->m_store, 180 kStateNetworkGlobalDNSKey); 170 CFPropertyListRef propertyRef = SCDynamicStoreCopyValue(m->m_store, kStateNetworkGlobalDNSKey); 181 171 /** 182 172 * # scutil … … 202 192 HostDnsInformation info; 203 193 CFStringRef domainNameRef = (CFStringRef)CFDictionaryGetValue( 204 static_cast<CFDictionaryRef>(propertyRef), CFSTR("DomainName")); 194 static_cast<CFDictionaryRef>(propertyRef), CFSTR("DomainName")); 195 205 196 if (domainNameRef) 206 197 { 207 const char *pszDomainName = CFStringGetCStringPtr(domainNameRef, 208 CFStringGetSystemEncoding()); 198 const char *pszDomainName = CFStringGetCStringPtr(domainNameRef, CFStringGetSystemEncoding()); 209 199 if (pszDomainName) 210 200 info.domain = pszDomainName; … … 212 202 213 203 int i, arrayCount; 204 214 205 CFArrayRef serverArrayRef = (CFArrayRef)CFDictionaryGetValue( 215 static_cast<CFDictionaryRef>(propertyRef), CFSTR("ServerAddresses"));206 static_cast<CFDictionaryRef>(propertyRef), CFSTR("ServerAddresses")); 216 207 if (serverArrayRef) 217 208 { … … 223 214 continue; 224 215 225 const char *pszServerAddress = CFStringGetCStringPtr(serverAddressRef, 226 CFStringGetSystemEncoding()); 216 const char *pszServerAddress = CFStringGetCStringPtr(serverAddressRef, CFStringGetSystemEncoding()); 227 217 if (!pszServerAddress) 228 218 continue; … … 233 223 234 224 CFArrayRef searchArrayRef = (CFArrayRef)CFDictionaryGetValue( 235 static_cast<CFDictionaryRef>(propertyRef), CFSTR("SearchDomains")); 225 static_cast<CFDictionaryRef>(propertyRef), CFSTR("SearchDomains")); 226 236 227 if (searchArrayRef) 237 228 { … … 244 235 continue; 245 236 246 const char *pszSearchString = CFStringGetCStringPtr(searchStringRef, 247 CFStringGetSystemEncoding()); 237 const char *pszSearchString = CFStringGetCStringPtr(searchStringRef, CFStringGetSystemEncoding()); 248 238 if (!pszSearchString) 249 239 continue; … … 258 248 259 249 return S_OK; 250 } 251 252 void HostDnsServiceDarwin::hostDnsServiceStoreCallback(void *, void *, void *info) 253 { 254 HostDnsServiceDarwin *pThis = (HostDnsServiceDarwin *)info; 255 256 RTCLock grab(pThis->m_LockMtx); 257 pThis->updateInfo(); 260 258 } 261 259 … … 266 264 pThis->m_fStop = true; 267 265 } 266
Note:
See TracChangeset
for help on using the changeset viewer.