VirtualBox

Changeset 78004 in vbox


Ignore:
Timestamp:
Apr 3, 2019 4:08:42 PM (6 years ago)
Author:
vboxsync
Message:

Main/HostDnsServiceDarwin: Formatting nits, moved hostDnsServiceStoreCallback() to the bottom. No functional changes.

File:
1 edited

Legend:

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

    r78000 r78004  
    6464}
    6565
    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 
    7566HRESULT HostDnsServiceDarwin::init(HostDnsMonitorProxy *pProxy)
    7667{
     
    177168HRESULT HostDnsServiceDarwin::updateInfo(void)
    178169{
    179     CFPropertyListRef propertyRef = SCDynamicStoreCopyValue(m->m_store,
    180                                                             kStateNetworkGlobalDNSKey);
     170    CFPropertyListRef propertyRef = SCDynamicStoreCopyValue(m->m_store, kStateNetworkGlobalDNSKey);
    181171    /**
    182172     * # scutil
     
    202192    HostDnsInformation info;
    203193    CFStringRef domainNameRef = (CFStringRef)CFDictionaryGetValue(
    204       static_cast<CFDictionaryRef>(propertyRef), CFSTR("DomainName"));
     194       static_cast<CFDictionaryRef>(propertyRef), CFSTR("DomainName"));
     195
    205196    if (domainNameRef)
    206197    {
    207         const char *pszDomainName = CFStringGetCStringPtr(domainNameRef,
    208                                                     CFStringGetSystemEncoding());
     198        const char *pszDomainName = CFStringGetCStringPtr(domainNameRef, CFStringGetSystemEncoding());
    209199        if (pszDomainName)
    210200            info.domain = pszDomainName;
     
    212202
    213203    int i, arrayCount;
     204
    214205    CFArrayRef serverArrayRef = (CFArrayRef)CFDictionaryGetValue(
    215       static_cast<CFDictionaryRef>(propertyRef), CFSTR("ServerAddresses"));
     206       static_cast<CFDictionaryRef>(propertyRef), CFSTR("ServerAddresses"));
    216207    if (serverArrayRef)
    217208    {
     
    223214                continue;
    224215
    225             const char *pszServerAddress = CFStringGetCStringPtr(serverAddressRef,
    226                                                            CFStringGetSystemEncoding());
     216            const char *pszServerAddress = CFStringGetCStringPtr(serverAddressRef, CFStringGetSystemEncoding());
    227217            if (!pszServerAddress)
    228218                continue;
     
    233223
    234224    CFArrayRef searchArrayRef = (CFArrayRef)CFDictionaryGetValue(
    235       static_cast<CFDictionaryRef>(propertyRef), CFSTR("SearchDomains"));
     225       static_cast<CFDictionaryRef>(propertyRef), CFSTR("SearchDomains"));
     226
    236227    if (searchArrayRef)
    237228    {
     
    244235                continue;
    245236
    246             const char *pszSearchString = CFStringGetCStringPtr(searchStringRef,
    247                                                           CFStringGetSystemEncoding());
     237            const char *pszSearchString = CFStringGetCStringPtr(searchStringRef, CFStringGetSystemEncoding());
    248238            if (!pszSearchString)
    249239                continue;
     
    258248
    259249    return S_OK;
     250}
     251
     252void HostDnsServiceDarwin::hostDnsServiceStoreCallback(void *, void *, void *info)
     253{
     254    HostDnsServiceDarwin *pThis = (HostDnsServiceDarwin *)info;
     255
     256    RTCLock grab(pThis->m_LockMtx);
     257    pThis->updateInfo();
    260258}
    261259
     
    266264    pThis->m_fStop = true;
    267265}
     266
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