From: W.C.A. Wijngaards Date: Wed, 10 Apr 2024 09:27:08 +0000 (+0200) Subject: - Fixup compile without cachedb. X-Git-Tag: release-1.20.0rc1~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d55511f1dd3a2eb351b9459b4a8ea557875e5492;p=thirdparty%2Funbound.git - Fixup compile without cachedb. --- diff --git a/doc/Changelog b/doc/Changelog index d40e246e8..421505d96 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - Implement cachedb-check-when-serve-expired: yes option, default is enabled. When serve expired is enabled with cachedb, it first checks cachedb before serving the expired response. + - Fixup compile without cachedb. 9 April 2024: Yorgos - Merge #1043 from xiaoxiaoafeifei: Add loongarch support; updates diff --git a/services/mesh.c b/services/mesh.c index 5bbff2995..80d4a5aa5 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -511,6 +511,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, log_err("mesh_new_client: out of memory initializing serve expired"); goto servfail_mem; } +#ifdef USE_CACHEDB if(!timeout && mesh->env->cfg->serve_expired && !mesh->env->cfg->serve_expired_client_timeout && (mesh->env->cachedb_enabled && @@ -520,6 +521,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, goto servfail_mem; } } +#endif /* update statistics */ if(was_detached) { log_assert(mesh->num_detached_states > 0); @@ -625,6 +627,7 @@ mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo, mesh_state_delete(&s->s); return 0; } +#ifdef USE_CACHEDB if(!timeout && mesh->env->cfg->serve_expired && !mesh->env->cfg->serve_expired_client_timeout && (mesh->env->cachedb_enabled && @@ -635,6 +638,7 @@ mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo, return 0; } } +#endif /* update statistics */ if(was_detached) { log_assert(mesh->num_detached_states > 0);