Use RRExpireTime(rr) macro instead of "rr->TimeRcvd + TicksTTL(rr)" expression.
authorcheshire@apple.com <cheshire@apple.com@214c2c4a-bf3b-4dcf-9390-e4dd3010487d>
Thu, 17 Sep 2009 21:20:21 +0000 (21:20 +0000)
committercheshire@apple.com <cheshire@apple.com@214c2c4a-bf3b-4dcf-9390-e4dd3010487d>
Thu, 17 Sep 2009 21:20:21 +0000 (21:20 +0000)
git-svn-id: http://svn.macosforge.org/repository/mDNSResponder/trunk@6679 214c2c4a-bf3b-4dcf-9390-e4dd3010487d

mDNSCore/mDNS.c

index 8743f5e..ef5a604 100755 (executable)
@@ -5305,7 +5305,7 @@ exit:
                                        if (SameNameRecordAnswersQuestion(&rr->resrec, &q))
                                                {
                                                // 1. If we got a fresh answer to this query, then don't need to generate a negative entry
-                                               if (rr->TimeRcvd + TicksTTL(rr) - m->timenow > 0) break;
+                                               if (RRExpireTime(rr) - m->timenow > 0) break;
                                                // 2. If we already had a negative entry, keep track of it so we can resurrect it instead of creating a new one
                                                if (rr->resrec.RecordType == kDNSRecordTypePacketNegative) neg = rr;
                                                }