static RETSIGTYPE record_sigh(int sig)
{
#ifdef LIBEVENT_SIGNAL_PROBLEM
+ verbose(VERB_OPS, "quit on signal, no cleanup and statistics, "
+ "because installed libevent version is not threadsafe");
exit(0);
#endif
switch(sig)
- ldns-src configure is done during unbound configure and
ldns-src make is done during unbound make, and so inherits the
make arguments from the unbound make invocation.
+ - nicer error when libevent problem causes instant exit on signal.
18 October 2007: Wouter
- addresses are logged with errors.
return NULL;
}
/* set */
- /* id uses lousy random() TODO use better and entropy */
pend->id = ((unsigned)ub_random(rnd)>>8) & 0xffff;
LDNS_ID_SET(ldns_buffer_begin(packet), pend->id);
memcpy(&pend->addr, addr, addrlen);
}
/* choose a random outgoing port and interface */
- /* TODO: entropy source. */
precho = (double)ub_random(rnd) * (double)nummax /
((double)RAND_MAX + 1.0);
chosen = (int)precho;
}
w->pkt = NULL;
w->pkt_len = 0;
- /* id uses lousy random() TODO use better and entropy */
id = ((unsigned)ub_random(rnd)>>8) & 0xffff;
LDNS_ID_SET(ldns_buffer_begin(packet), id);
memcpy(&w->addr, addr, addrlen);