return false;
}
-static bool dns_cache_remove(DnsCache *c, DnsResourceKey *key) {
+static bool dns_cache_remove_by_key(DnsCache *c, DnsResourceKey *key) {
DnsCacheItem *first, *i, *n;
assert(c);
assert(c);
while ((key = hashmap_first_key(c->by_key)))
- dns_cache_remove(c, key);
+ dns_cache_remove_by_key(c, key);
assert(hashmap_size(c->by_key) == 0);
assert(prioq_size(c->by_expiry) == 0);
/* Take an extra reference to the key so that it
* doesn't go away in the middle of the remove call */
key = dns_resource_key_ref(i->key);
- dns_cache_remove(c, key);
+ dns_cache_remove_by_key(c, key);
}
}
/* Take an extra reference to the key so that it
* doesn't go away in the middle of the remove call */
key = dns_resource_key_ref(i->key);
- dns_cache_remove(c, key);
+ dns_cache_remove_by_key(c, key);
}
}
}
* not on mDNS), delete all matching old RRs, so that we only
* keep complete by_key in place. */
if (key)
- dns_cache_remove(c, key);
+ dns_cache_remove_by_key(c, key);
/* Second, flush all entries matching the answer, unless this
* is an RR that is explicitly marked to be "shared" between
if (flags & DNS_ANSWER_SHARED_OWNER)
continue;
- dns_cache_remove(c, rr->key);
+ dns_cache_remove_by_key(c, rr->key);
}
}
* added, just in case */
if (key)
- dns_cache_remove(c, key);
+ dns_cache_remove_by_key(c, key);
DNS_ANSWER_FOREACH_FLAGS(rr, flags, answer) {
if ((flags & DNS_ANSWER_CACHEABLE) == 0)
continue;
- dns_cache_remove(c, rr->key);
+ dns_cache_remove_by_key(c, rr->key);
}
return r;