diff options
author | erwin <erwin@FreeBSD.org> | 2013-08-14 11:10:02 +0000 |
---|---|---|
committer | erwin <erwin@FreeBSD.org> | 2013-08-14 11:10:02 +0000 |
commit | f32b4abce98c97ee6e51b7aa8f8fde6e4cab7f28 (patch) | |
tree | 2158e1c09a984412fbfaaf073f515cd4e8f1ea60 /lib/isc/taskpool.c | |
parent | c110f0c4dc517517abacd7bc7c5d0d41325a4057 (diff) | |
download | FreeBSD-src-f32b4abce98c97ee6e51b7aa8f8fde6e4cab7f28.zip FreeBSD-src-f32b4abce98c97ee6e51b7aa8f8fde6e4cab7f28.tar.gz |
Vendor import of Bind 9.9.3-P2
Approved by: delphij (mentor, implicit)
Sponsored by: DK Hostmaster A/S
Diffstat (limited to 'lib/isc/taskpool.c')
-rw-r--r-- | lib/isc/taskpool.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/isc/taskpool.c b/lib/isc/taskpool.c index 7324cfa..a5ce0e8 100644 --- a/lib/isc/taskpool.c +++ b/lib/isc/taskpool.c @@ -165,9 +165,8 @@ isc_taskpool_destroy(isc_taskpool_t **poolp) { unsigned int i; isc_taskpool_t *pool = *poolp; for (i = 0; i < pool->ntasks; i++) { - if (pool->tasks[i] != NULL) { + if (pool->tasks[i] != NULL) isc_task_detach(&pool->tasks[i]); - } } isc_mem_put(pool->mctx, pool->tasks, pool->ntasks * sizeof(isc_task_t *)); @@ -175,4 +174,14 @@ isc_taskpool_destroy(isc_taskpool_t **poolp) { *poolp = NULL; } +void +isc_taskpool_setprivilege(isc_taskpool_t *pool, isc_boolean_t priv) { + unsigned int i; + + REQUIRE(pool != NULL); + for (i = 0; i < pool->ntasks; i++) { + if (pool->tasks[i] != NULL) + isc_task_setprivilege(pool->tasks[i], priv); + } +} |