[Freeipa-devel] [PATCH 0042] Flush zones and RRs cache when handling persistent search reconnection
Adam Tkac
atkac at redhat.com
Wed Aug 15 13:11:03 UTC 2012
On Fri, Jul 27, 2012 at 12:16:07PM +0200, Petr Spacek wrote:
> Hello,
>
> this patch implements "Flush zones and RRs cache when handling
> persistent search reconnection" behaviour as requested
> in ticket https://fedorahosted.org/bind-dyndb-ldap/ticket/44 .
>
> Petr^2 Spacek
> +isc_result_t
> +flush_ldap_cache(ldap_cache_t *cache)
> +{
> + isc_result_t result;
> +
> + REQUIRE(cache != NULL);
> +
> + LOCK(&cache->mutex);
> + if (!ldap_cache_enabled(cache)) {
> + result = ISC_R_SUCCESS;
> + } else {
> + dns_rbt_destroy(&cache->rbt);
> + CHECK(dns_rbt_create(cache->mctx, cache_node_deleter, NULL,
> + &cache->rbt));
In my opinion usage of dns_rbt_deletename(cache->rbt, dns_rootname, ISC_TRUE) is
better, isn't it?
Otherwise OK.
> + }
> +
> +cleanup:
> + if (result != ISC_R_SUCCESS)
> + log_error_r("cache flush failed");
> + UNLOCK(&cache->mutex);
> + return result;
> +}
Regards, Adam
--
Adam Tkac, Red Hat, Inc.
More information about the Freeipa-devel
mailing list