#define QUIT_COMMAND "QUIT" /* shut down if this input is encountered */
#ifdef WITH_RESOLVER_STATS
# define DUMP_COMMAND "DUMP" /* report on internal state */
-#endif
+#endif /* WITH_RESOLVER_STATS */
static
/*
N.B. The hostname in a cache entry is a flexible array!
- If this is ever updated to c99 style, also update how it's allocated
- in cache_add_.
+ If this is ever updated to c99 style, also update how it's
+ allocated in cache_add_.
*/
struct cache_entry {
lru_entry_t lru_; /* must be first */
unsigned short *vport;
socklen_t sockaddr_len;
-#ifdef DEBUG_PRETEND_IDENT
- size_t delay = lrand48() % IDENT_TIMEOUT;
- if (delay < 45) {
- delay = delay / 5;
- sleep(delay);
- } else {
- delay = 0;
- }
- LOG_VVV("pretending ident query took %zu seconds\n", delay);
- goto done;
-#endif /* DEBUG_PRETEND_IDENT */
-
deadline = time(&now) + IDENT_TIMEOUT;
fd = socket(ss->ss_family, SOCK_STREAM, 0);
}
#endif /* HAVE_GETRLIMIT */
-#ifdef DEBUG_PRETEND_IDENT
- srand48(getpid());
-#endif
-
g_log_stream_ = stderr;
while ( (c = getopt(argc, argv, "a:c:f:j:s:o:vh")) != EOF ) {
}
#ifdef LOG_DEBUG
+ /* forces muck-spawned resolver to log debug messages */
char lf[] = "/tmp/resolver-debug.XXXXXX";
int lf_fd = mkstemp(lf);