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)
This commit is contained in:
Jeffrey Altman 2004-03-19 19:50:27 +00:00 committed by Jeffrey Altman
parent bd1febc893
commit 4b0f00c407
2 changed files with 5 additions and 1 deletions

View File

@ -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));

View File

@ -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;