From: Vlad S. <ser...@us...> - 2005-08-01 20:38:26
|
Update of /cvsroot/naviserver/modules/nsdns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23506 Modified Files: nsdns.c Log Message: Index: nsdns.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsdns/nsdns.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** nsdns.c 1 Aug 2005 18:55:59 -0000 1.16 --- nsdns.c 1 Aug 2005 20:38:15 -0000 1.17 *************** *** 132,136 **** path = Ns_ConfigGetPath(server,module,NULL); ! address = Ns_ConfigGet(path,"address"); if(!Ns_ConfigGetInt(path,"flags",&dnsFlags)) dnsFlags = 0; --- 132,136 ---- path = Ns_ConfigGetPath(server,module,NULL); ! address = Ns_ConfigGetValue(path,"address"); if(!Ns_ConfigGetInt(path,"flags",&dnsFlags)) dnsFlags = 0; *************** *** 145,151 **** if(!Ns_ConfigGetInt(path,"proxyretries",&dnsProxyRetries)) dnsProxyRetries = 2; if (!Ns_ConfigGetInt(path,"threads",&dnsThreads)) dnsThreads = 1; ! dnsDefaultHost = Ns_ConfigGet(path,"defaulthost"); // Resolving dns servers ! dnsInit("nameserver",Ns_ConfigGet(path,"nameserver"),0); /* If no port specified it will be just client dns resolver module */ if(dnsPort > 0) { --- 145,151 ---- if(!Ns_ConfigGetInt(path,"proxyretries",&dnsProxyRetries)) dnsProxyRetries = 2; if (!Ns_ConfigGetInt(path,"threads",&dnsThreads)) dnsThreads = 1; ! dnsDefaultHost = Ns_ConfigGetValue(path,"defaulthost"); // Resolving dns servers ! dnsInit("nameserver",Ns_ConfigGetValue(path,"nameserver"),0); /* If no port specified it will be just client dns resolver module */ if(dnsPort > 0) { *************** *** 164,168 **** // DNS proxy thread if(!Ns_ConfigGetInt(path,"proxyport",&dnsProxyPort)) dnsProxyPort = 53; ! if((dnsProxyHost = Ns_ConfigGet(path,"proxyhost"))) { if(Ns_GetSockAddr(&dnsProxyAddr,dnsProxyHost,dnsProxyPort) != NS_OK || (dnsProxySock = socket(AF_INET,SOCK_DGRAM,0)) == -1) { --- 164,168 ---- // DNS proxy thread if(!Ns_ConfigGetInt(path,"proxyport",&dnsProxyPort)) dnsProxyPort = 53; ! if((dnsProxyHost = Ns_ConfigGetValue(path,"proxyhost"))) { if(Ns_GetSockAddr(&dnsProxyAddr,dnsProxyHost,dnsProxyPort) != NS_OK || (dnsProxySock = socket(AF_INET,SOCK_DGRAM,0)) == -1) { *************** *** 199,203 **** Ns_MutexSetName2(&dnsProxyMutex,"nsdns","proxy"); Ns_Log(Notice,"nsdns: version %s listening on %s:%d, FD %d:%d",VERSION,address?address:"0.0.0.0",dnsPort,dnsUdpSock,dnsTcpSock); ! return Ns_TclInitInterps(server,DnsInterpInit,NULL); } --- 199,204 ---- Ns_MutexSetName2(&dnsProxyMutex,"nsdns","proxy"); Ns_Log(Notice,"nsdns: version %s listening on %s:%d, FD %d:%d",VERSION,address?address:"0.0.0.0",dnsPort,dnsUdpSock,dnsTcpSock); ! Ns_TclRegisterTrace(server, DnsInterpInit, 0, NS_TCL_TRACE_CREATE); ! return NS_OK; } *************** *** 402,406 **** while(hrec) { client = Tcl_GetHashValue(hrec); ! stats = Tcl_HashStats(&client->list); addr.s_addr = (unsigned long)Tcl_GetHashKey(&dnsClientList, hrec); Tcl_AppendElement(interp, ns_inet_ntoa(addr)); --- 403,407 ---- while(hrec) { client = Tcl_GetHashValue(hrec); ! stats = (char*)Tcl_HashStats(&client->list); addr.s_addr = (unsigned long)Tcl_GetHashKey(&dnsClientList, hrec); Tcl_AppendElement(interp, ns_inet_ntoa(addr)); |