Mercurial > dnsbl
comparison src/dnsbl.cpp @ 150:a23ef169d322
limit dns resolver timeouts and retry interval
author | carl |
---|---|
date | Tue, 27 Mar 2007 15:22:07 -0700 |
parents | 9330b8d6a56b |
children | c7fc218686f5 |
comparison
equal
deleted
inserted
replaced
149:9581f6e62574 | 150:a23ef169d322 |
---|---|
476 #ifdef RESOLVER_DEBUG | 476 #ifdef RESOLVER_DEBUG |
477 char text[1000]; | 477 char text[1000]; |
478 snprintf(text, sizeof(text), "process_resolver_requests() has a question %s", question); | 478 snprintf(text, sizeof(text), "process_resolver_requests() has a question %s", question); |
479 my_syslog(text); | 479 my_syslog(text); |
480 #endif | 480 #endif |
481 if ((_res.options & RES_INIT) == 0) res_init(); | |
482 _res.retry = 2; | |
483 _res.retrans = RES_TIMEOUT; | |
481 glom.length = res_search(question, ns_c_in, ns_t_a, glom.answer, sizeof(glom.answer)); | 484 glom.length = res_search(question, ns_c_in, ns_t_a, glom.answer, sizeof(glom.answer)); |
482 if (glom.length < 0) glom.length = 0; // represent all errors as zero length answers | 485 if (glom.length < 0) glom.length = 0; // represent all errors as zero length answers |
483 #else | 486 #else |
484 glom.length = sizeof(glom.answer); | 487 glom.length = sizeof(glom.answer); |
485 glom.answer = 0; | 488 glom.answer = 0; |