aboutsummaryrefslogtreecommitdiffstats
path: root/src/cache/query.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2024-09-13 09:38:07 +0000
committerLaurent Bercot <ska@appnovation.com>2024-09-13 09:38:07 +0000
commitfb355e4200fcf98f36a4f3e1fbeb1e16b4761ee6 (patch)
treebf78792e9206e121607ad786432c0b60bbdcdc72 /src/cache/query.c
parent45c04a53fb9fbefe4dd86514c7563b4af1961dfb (diff)
downloadshibari-fb355e4200fcf98f36a4f3e1fbeb1e16b4761ee6.tar.gz
Push what I have for now
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/cache/query.c')
-rw-r--r--src/cache/query.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cache/query.c b/src/cache/query.c
index 7fa5af3..4832340 100644
--- a/src/cache/query.c
+++ b/src/cache/query.c
@@ -47,12 +47,12 @@ uint16_t query_event (uint16_t qid)
default : rcode = 2 ; break ;
}
s6dns_engine_query(&q->dt, &question.s, &question.len, &qtype) ;
- r = dcache_searchnode_g(&g->dcache, &nodeid, question.s, question.len, qtype) ;
+ r = dcache_search_g(&g->dcache, &nodeid, question.s, question.len, qtype) ;
switch (r)
{
case -1 :
log_warn_unexpected_answer(question.s, question.len, qtype, 0) ;
- if (!rcode) dcache_add_new_answer(&g->dcache, question.s, question.len, qtype, s6dns_engine_packet(&q->dt), s6dns_engine_packetlen(&q->dt)) ;
+ if (!rcode) dcache_add_g(&g->dcache, question.s, question.len, qtype, s6dns_engine_packet(&q->dt), s6dns_engine_packetlen(&q->dt), &expire) ;
break ;
case 1 :
log_warn_unexpected_answer(question.s, question.len, qtype, 1) ;