worker_sighandler(int sig, void* arg)
{
/* note that log, print, syscalls here give race conditions. */
+ /* we still print DETAIL logs, because this is extensive per message
+ * logging anyway, and the operator may then have an interest
+ * in the cause for unbound to exit */
struct worker* worker = (struct worker*)arg;
switch(sig) {
case SIGHUP:
18 October 2007: Wouter
- addresses are logged with errors.
+ - fixup testcode fake event to remove pending before callback
+ since the callback may create new pending items.
+ - tests updated because retries are now in iterator module.
17 October 2007: Wouter
- fixup another cycle detect and ns-addr timeout resolution bug.
struct fake_pending* p = runtime->pending_list;
struct comm_reply repinfo;
struct comm_point c;
+ void* cb_arg = p->cb_arg;
+ comm_point_callback_t* cb = p->callback;
+
memset(&c, 0, sizeof(c));
if(!p) fatal_exit("No pending queries.");
log_assert(todo->qname == NULL); /* or find that one */
repinfo.c = &c;
repinfo.addrlen = p->addrlen;
memcpy(&repinfo.addr, &p->addr, p->addrlen);
- if((*p->callback)(&c, p->cb_arg, error, &repinfo)) {
+ pending_list_delete(runtime, p);
+ if((*cb)(&c, cb_arg, error, &repinfo)) {
fatal_exit("unexpected: pending callback returned 1");
}
/* delete the pending item. */
ldns_buffer_free(c.buffer);
- pending_list_delete(runtime, p);
}
/**