Commit 4f4c18d6 authored by Evan Hunt's avatar Evan Hunt
Browse files

associate a lock with the memory pool in the filter-aaaa plugin

parent 2c85466c
......@@ -83,6 +83,7 @@ typedef struct filter_instance {
* Memory pool for use with persistent data.
*/
isc_mempool_t *datapool;
isc_mutex_t plock;
/*
* Hash table associating a client object with its persistent data.
......@@ -388,6 +389,8 @@ plugin_register(const char *parameters,
*/
isc_mempool_setfillcount(inst->datapool, 1024);
isc_mempool_setfreemax(inst->datapool, UINT_MAX);
isc_mutex_init(&inst->plock);
isc_mempool_associatelock(inst->datapool, &inst->plock);
/*
* Set hook points in the view's hooktable.
......@@ -446,6 +449,7 @@ plugin_destroy(void **instp) {
}
if (inst->datapool != NULL) {
isc_mempool_destroy(&inst->datapool);
isc_mutex_destroy(&inst->plock);
}
if (inst->aaaa_acl != NULL) {
dns_acl_detach(&inst->aaaa_acl);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment