Module Name:    src
Committed By:   christos
Date:           Wed Apr 11 18:34:18 UTC 2018

Modified Files:
        src/external/apache2/mDNSResponder/dist/mDNSPosix: PosixDaemon.c

Log Message:
Add the missing lock.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
    src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.11 src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.11	Sat Mar  3 11:09:56 2018
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c	Wed Apr 11 14:34:18 2018
@@ -48,6 +48,7 @@ extern int daemon(int, int);
 #include "mDNSUNP.h"        // For daemon()
 #include "uds_daemon.h"
 #include "PlatformCommon.h"
+#include "DNSCommon.h"
 
 #define CONFIG_FILE "/etc/mdnsd.conf"
 static domainname DynDNSZone;                // Default wide-area zone for service registration
@@ -89,8 +90,10 @@ static void Reconfigure(mDNS *m)
     mDNSAddr DynDNSIP;
     const mDNSAddr dummy = { mDNSAddrType_IPv4, { { { 1, 1, 1, 1 } } } };;
     mDNS_SetPrimaryInterfaceInfo(m, NULL, NULL, NULL);
+    mDNS_Lock(m);
     if (ParseDNSServers(m, uDNS_SERVERS_FILE) < 0)
         LogMsg("Unable to parse DNS server list. Unicast DNS-SD unavailable");
+    mDNS_Unlock(m);
     ReadDDNSSettingsFromConfFile(m, CONFIG_FILE, &DynDNSHostname, &DynDNSZone, NULL);
     mDNSPlatformSourceAddrForDest(&DynDNSIP, &dummy);
     if (DynDNSHostname.c[0]) mDNS_AddDynDNSHostName(m, &DynDNSHostname, NULL, NULL);

Reply via email to