From a9328088fe7fe54af543e631edb96889206fa116 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 9 May 2006 12:04:44 +0200 Subject: [PATCH] dnsapi: The ttl value should be ignored when comparing dns records. --- dlls/dnsapi/record.c | 1 - dlls/dnsapi/tests/record.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/dnsapi/record.c b/dlls/dnsapi/record.c index 8b68314e311..27143ec12e4 100644 --- a/dlls/dnsapi/record.c +++ b/dlls/dnsapi/record.c @@ -134,7 +134,6 @@ BOOL WINAPI DnsRecordCompare( PDNS_RECORD r1, PDNS_RECORD r2 ) if (r1->wType != r2->wType || r1->wDataLength != r2->wDataLength || r1->Flags.DW != r2->Flags.DW || - r1->dwTtl != r2->dwTtl || r1->dwReserved != r2->dwReserved) return FALSE; wide = (r1->Flags.S.CharSet == DnsCharSetUnicode) ? TRUE : FALSE; diff --git a/dlls/dnsapi/tests/record.c b/dlls/dnsapi/tests/record.c index 6173e57f189..0b5b0a690f6 100644 --- a/dlls/dnsapi/tests/record.c +++ b/dlls/dnsapi/tests/record.c @@ -65,6 +65,9 @@ static void test_DnsRecordCompare( void ) r1.Flags.S.CharSet = DnsCharSetAnsi; ok( pDnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == TRUE, "failed unexpectedly\n" ); + r1.dwTtl = 0; + ok( pDnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == TRUE, "failed unexpectedly\n" ); + r2.Data.A.IpAddress = 0; ok( pDnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == FALSE, "succeeded unexpectedly\n" ); }