Module Name:    src
Committed By:   roy
Date:           Thu Oct 15 10:29:57 UTC 2015

Modified Files:
        src/external/apache2/mDNSResponder/dist/mDNSCore: mDNS.c

Log Message:
If scheduling a probe or response is in the past or exactly now, schedule
it for now + 1 to avoid log file spam about not all probes being sent.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
    src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.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/mDNSCore/mDNS.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.4 src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.5
--- src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.4	Mon Mar 31 23:26:30 2014
+++ src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c	Thu Oct 15 10:29:57 2015
@@ -687,14 +687,18 @@ mDNSlocal void SetNextAnnounceProbeTime(
 		// If (rr->LastAPTime + rr->ThisAPInterval) happens to be far in the past, we don't want to allow
 		// NextScheduledProbe to be set excessively in the past, because that can cause bad things to happen.
 		// See: <rdar://problem/7795434> mDNS: Sometimes advertising stops working and record interval is set to zero
-		if (m->NextScheduledProbe - m->timenow < 0)
-			m->NextScheduledProbe = m->timenow;
+		// A future time also needs to be set to avoid spamming logs about not all probes being sent.
+		if (m->NextScheduledProbe - m->timenow <= 0)
+			m->NextScheduledProbe = m->timenow + 1;
 		}
 	else if (rr->AnnounceCount && (ResourceRecordIsValidAnswer(rr) || rr->resrec.RecordType == kDNSRecordTypeDeregistering))
 		{
 		if (m->NextScheduledResponse - (rr->LastAPTime + rr->ThisAPInterval) >= 0)
 			m->NextScheduledResponse = (rr->LastAPTime + rr->ThisAPInterval);
 		}
+		// A future time also needs to be set to avoid spamming logs about not all responses being sent.
+		if (m->NextScheduledResponse - m->timenow <= 0)
+			m->NextScheduledResponse = m->timenow + 1;
 	}
 
 mDNSlocal void InitializeLastAPTime(mDNS *const m, AuthRecord *const rr)

Reply via email to