From: Vlad S. <ser...@us...> - 2007-03-29 19:46:39
|
Update of /cvsroot/naviserver/modules/nsdns In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17519 Modified Files: nsdns.c Log Message: Added new cachettl, code updates Index: nsdns.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsdns/nsdns.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** nsdns.c 29 Mar 2007 19:44:20 -0000 1.28 --- nsdns.c 29 Mar 2007 19:46:35 -0000 1.29 *************** *** 1178,1182 **** drec->timestamp = now; drec->next = drec->prev = 0; ! if (dnsCacheTTL) { drec->ttl = dnsCacheTTL; } --- 1178,1184 ---- drec->timestamp = now; drec->next = drec->prev = 0; ! // Cache only if record has ttl and its ttl is less than configured, ! // this is to keep cached records longer ! if (drec->ttl && drec->ttl < dnsCacheTTL) { drec->ttl = dnsCacheTTL; } |