VirtualBox

Changeset 78033 in vbox for trunk/src


Ignore:
Timestamp:
Apr 6, 2019 6:07:58 PM (6 years ago)
Author:
vboxsync
Message:

Main/HostDnsServiceDarwin: Add and remove the stop source object in the thread function for consistentcy. Also should fix the startup crashes.

File:
1 edited

Legend:

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

    r78030 r78033  
    9191    AssertReturn(m->m_SourceStop, E_FAIL);
    9292
    93     CFRunLoopAddSource(m->m_RunLoopRef, m->m_SourceStop, kCFRunLoopCommonModes);
    94 
    9593    HRESULT hrc = HostDnsServiceBase::init(pProxy);
    9694    return hrc;
     
    10199    HostDnsServiceBase::uninit();
    102100
    103     CFRunLoopRemoveSource(m->m_RunLoopRef, m->m_SourceStop, kCFRunLoopCommonModes);
    104101    CFRelease(m->m_SourceStop);
    105 
    106102    CFRelease(m->m_RunLoopRef);
    107 
    108103    CFRelease(m->m_DnsWatcher);
    109 
    110104    CFRelease(m->m_store);
    111105
     
    134128
    135129    CFRetain(m->m_RunLoopRef);
     130
     131    CFRunLoopAddSource(m->m_RunLoopRef, m->m_SourceStop, kCFRunLoopCommonModes);
    136132
    137133    CFArrayRef watchingArrayRef = CFArrayCreate(NULL,
     
    159155        CFRunLoopRun();
    160156    }
     157
     158    CFRunLoopRemoveSource(m->m_RunLoopRef, m->m_SourceStop, kCFRunLoopCommonModes);
    161159
    162160    /* We're notifying stopper thread. */
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