summaryrefslogtreecommitdiff
path: root/main/threadpool.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-01-15 20:15:00 +0000
committerMark Michelson <mmichelson@digium.com>2013-01-15 20:15:00 +0000
commit03e89247ded06b5320684bfa10a6e5e2fbe57646 (patch)
treef00dbf712892926e00fa98719997354f3794f2d8 /main/threadpool.c
parentc6bc51ef28a79303500ab541684e8adc331cc662 (diff)
Address further review feedback from David Lee.
* Clarify some documentation * Change copyright date of taskprocessor files * Address potential issue of creating taskprocessor with listener if taskprocessor with that name exists already git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/threadpool.c')
-rw-r--r--main/threadpool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/threadpool.c b/main/threadpool.c
index 358184caa..bdb71dce5 100644
--- a/main/threadpool.c
+++ b/main/threadpool.c
@@ -613,7 +613,9 @@ static void threadpool_tps_shutdown(struct ast_taskprocessor_listener *listener)
{
struct ast_threadpool *pool = listener->user_data;
- pool->listener->callbacks->shutdown(pool->listener);
+ if (pool->listener && pool->listener->callbacks->shutdown) {
+ pool->listener->callbacks->shutdown(pool->listener);
+ }
ao2_cleanup(pool->active_threads);
ao2_cleanup(pool->idle_threads);
ao2_cleanup(pool->zombie_threads);