+26 May 2009: Wouter
+ - Thanks again to Brett Carr, found an assertion that was not true.
+ Assertion checked if recursion parent query still existed.
+
29 April 2009: Wouter
- Thanks to Brett Carr, caught windows resource leak, use
closesocket() and not close() on sockets or else the network stack
struct iter_qstate* iq = (struct iter_qstate*)qstate->minfo[id];
enum response_type type = response_type_from_server(0, iq->response,
&iq->qchase, iq->dp);
+ /* @@@ DEBUG - fail to prime roots often */
+ /* if((ub_random(qstate->env->rnd) & 0x7) != 0)
+ type = RESPONSE_TYPE_ANSWER+1; */
if(type == RESPONSE_TYPE_ANSWER) {
qstate->return_rcode = LDNS_RCODE_NOERROR;
qstate->return_msg = iq->response;
log_query_info(VERB_ALGO, "processTargetResponse super", &forq->qinfo);
/* check to see if parent event is still interested (in orig name). */
+ if(!foriq->dp)
+ return; /* not interested anymore */
dpns = delegpt_find_ns(foriq->dp, qstate->qinfo.qname,
qstate->qinfo.qname_len);
if(!dpns) {
- /* FIXME: maybe store this nameserver address in the cache
- * anyways? */
- /* If not, just stop processing this event */
+ /* If not interested, just stop processing this event */
verbose(VERB_ALGO, "subq: parent not interested anymore");
- /* this is an error, and will cause parent to be reactivated
- * even though nothing has happened */
- log_assert(0);
+ /* could be because parent was jostled out of the cache,
+ and a new identical query arrived, that does not want it*/
return;
}
worker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev), void* arg)
{
struct worker* worker = (struct worker*)arg;
+ verbosity = 5; /* @@@ DEBUG */
verbose(VERB_QUERY, "caught stop signal (wsaevent)");
worker->need_to_exit = 1;
comm_base_exit(worker->base);