]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup chachedb printout.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 20 Oct 2016 14:56:08 +0000 (14:56 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 20 Oct 2016 14:56:08 +0000 (14:56 +0000)
git-svn-id: file:///svn/unbound/trunk@3900 be551aaa-1e26-0410-a405-d3ace91eadb9

cachedb/cachedb.c

index 76d9afa47c8fc282e4159b53c85b9e78177c5f2f..b696128d0c2161b517036fbc27686a328150826f 100644 (file)
@@ -556,10 +556,15 @@ cachedb_handle_query(struct module_qstate* qstate,
 
        /* lookup inside unbound's internal cache */
        if(cachedb_intcache_lookup(qstate)) {
-               if(verbosity >= VERB_ALGO)
-                       log_dns_msg("cachedb internal cache lookup",
-                               &qstate->return_msg->qinfo,
-                               qstate->return_msg->rep);
+               if(verbosity >= VERB_ALGO) {
+                       if(qstate->return_msg->rep)
+                               log_dns_msg("cachedb internal cache lookup",
+                                       &qstate->return_msg->qinfo,
+                                       qstate->return_msg->rep);
+                       else log_info("cachedb internal cache lookup: rcode %s",
+                               sldns_lookup_by_id(sldns_rcodes, qstate->return_rcode)?
+                               sldns_lookup_by_id(sldns_rcodes, qstate->return_rcode)->name:"??");
+               }
                /* we are done with the query */
                qstate->ext_state[id] = module_finished;
                return;