From: Marek VavrusÌŒa Date: Mon, 12 Mar 2018 04:04:19 +0000 (-0700) Subject: cache: restored kr_cache_insert_rr API X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f16b5b145826bef75f23ca8837a2d19e981d333;p=thirdparty%2Fknot-resolver.git cache: restored kr_cache_insert_rr API This commit abstracts out stash_rrset from stash_rrarray_entry, and fixes incrementing metrics on actual record insertion. It then resurfaces kr_cache_insert_rr that was deleted in 2.0 using the extracted function. --- diff --git a/lib/cache/api.c b/lib/cache/api.c index 34b89b9d5..1c8bf977b 100644 --- a/lib/cache/api.c +++ b/lib/cache/api.c @@ -54,7 +54,6 @@ static const uint16_t CACHE_VERSION = 5; #define KEY_HSIZE (sizeof(uint8_t) + sizeof(uint16_t)) #define KEY_SIZE (KEY_HSIZE + KNOT_DNAME_MAXLEN) - /** @internal Forward declarations of the implementation details * \param optout[out] Set *optout = true; when encountering an opt-out NSEC3 (optional). */ static ssize_t stash_rrset(struct kr_cache *cache, const struct kr_query *qry,