From 4b0f00c40799cdecfaaac232dea41afed1fd8219 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 19 Mar 2004 19:50:27 +0000 Subject: [PATCH] dns-fixes-20040319 Reorganize some debug statements to put them in more consistent locations Do not initialize the internal dns support if using the Windows DNS API. (Win2000 and above) --- src/WINNT/afsd/cm_config.c | 4 +++- src/WINNT/afsd/cm_dns.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_config.c b/src/WINNT/afsd/cm_config.c index 6063b00ba..39d1ecc9d 100644 --- a/src/WINNT/afsd/cm_config.c +++ b/src/WINNT/afsd/cm_config.c @@ -391,7 +391,9 @@ long cm_SearchCellByDNS(char *cellNamep, char *newCellNamep, int *ttl, success = FALSE; - /* query the AFSDB records of cell */ + DebugEvent_local("AFS SearchCellDNS-","Doing search for [%s]", cellNamep); + + /* query the AFSDB records of cell */ if(DnsQuery_A(cellNamep, DNS_TYPE_AFSDB, DNS_QUERY_STANDARD, NULL, &pDnsCell, NULL) == ERROR_SUCCESS) { memset((void*) &vlSockAddr, 0, sizeof(vlSockAddr)); diff --git a/src/WINNT/afsd/cm_dns.c b/src/WINNT/afsd/cm_dns.c index f394cf214..c9d452d62 100644 --- a/src/WINNT/afsd/cm_dns.c +++ b/src/WINNT/afsd/cm_dns.c @@ -596,9 +596,11 @@ int getAFSServer(char *cellName, int *cellHosts, int *numServers, int *ttl) fprintf(stderr, "getAFSServer: cell %s, cm_dnsEnabled=%d\n", cellName, cm_dnsEnabled); #endif +#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x500 if (cm_dnsEnabled == -1) { /* not yet initialized, eg when called by klog */ cm_InitDNS(1); /* assume enabled */ } +#endif if (cm_dnsEnabled == 0) { /* possibly we failed in cm_InitDNS above */ fprintf(stderr, "DNS initialization failed, disabled\n"); *numServers = 0; -- 2.39.5