Thu Oct 15 10:24:33 2015 UTC ()
Revert r1.5 now that the time calculations are using a monotonic clock.


(roy)
diff -r1.5 -r1.6 src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c

cvs diff -r1.5 -r1.6 src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c (expand / switch to unified diff)

--- src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c 2014/11/25 02:29:57 1.5
+++ src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c 2015/10/15 10:24:33 1.6
@@ -2687,27 +2687,27 @@ mDNSexport void mDNS_Lock_(mDNS *const m @@ -2687,27 +2687,27 @@ mDNSexport void mDNS_Lock_(mDNS *const m
2687 m->timenow = mDNS_TimeNow_NoLock(m); 2687 m->timenow = mDNS_TimeNow_NoLock(m);
2688 if (m->timenow == 0) m->timenow = 1; 2688 if (m->timenow == 0) m->timenow = 1;
2689 } 2689 }
2690 else if (m->timenow == 0) 2690 else if (m->timenow == 0)
2691 { 2691 {
2692 LogMsg("%s: mDNS_Lock: m->mDNS_busy is %ld but m->timenow not set", functionname, m->mDNS_busy); 2692 LogMsg("%s: mDNS_Lock: m->mDNS_busy is %ld but m->timenow not set", functionname, m->mDNS_busy);
2693 m->timenow = mDNS_TimeNow_NoLock(m); 2693 m->timenow = mDNS_TimeNow_NoLock(m);
2694 if (m->timenow == 0) m->timenow = 1; 2694 if (m->timenow == 0) m->timenow = 1;
2695 } 2695 }
2696 2696
2697 if (m->timenow_last - m->timenow > 0) 2697 if (m->timenow_last - m->timenow > 0)
2698 { 2698 {
2699 m->timenow_adjust += m->timenow_last - m->timenow; 2699 m->timenow_adjust += m->timenow_last - m->timenow;
2700 debugf("%s: mDNSPlatformRawTime went backwards by %ld ticks; setting correction factor to %ld", functionname, m->timenow_last - m->timenow, m->timenow_adjust); 2700 LogMsg("%s: mDNSPlatformRawTime went backwards by %ld ticks; setting correction factor to %ld", functionname, m->timenow_last - m->timenow, m->timenow_adjust);
2701 m->timenow = m->timenow_last; 2701 m->timenow = m->timenow_last;
2702 } 2702 }
2703 m->timenow_last = m->timenow; 2703 m->timenow_last = m->timenow;
2704 2704
2705 // Increment mDNS_busy so we'll recognise re-entrant calls 2705 // Increment mDNS_busy so we'll recognise re-entrant calls
2706 m->mDNS_busy++; 2706 m->mDNS_busy++;
2707 } 2707 }
2708 2708
2709mDNSlocal AuthRecord *AnyLocalRecordReady(const mDNS *const m) 2709mDNSlocal AuthRecord *AnyLocalRecordReady(const mDNS *const m)
2710 { 2710 {
2711 AuthRecord *rr; 2711 AuthRecord *rr;
2712 for (rr = m->NewLocalRecords; rr; rr = rr->next) 2712 for (rr = m->NewLocalRecords; rr; rr = rr->next)
2713 if (LocalRecordReady(rr)) return rr; 2713 if (LocalRecordReady(rr)) return rr;