summaryrefslogtreecommitdiff
path: root/main/threadpool.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-12-11 16:36:08 +0000
committerMark Michelson <mmichelson@digium.com>2012-12-11 16:36:08 +0000
commit2abda6400324156688b28d818b180940164e6b2c (patch)
tree2c8d67e1858248f445d7146eaa23baab9b874646 /main/threadpool.c
parent8760e32ae380f65420799c290f7b92d40cd7926c (diff)
Add threadpool option version check into threadpool creation routine.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/threadpool.c')
-rw-r--r--main/threadpool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/threadpool.c b/main/threadpool.c
index b3195fc4c..663de3b36 100644
--- a/main/threadpool.c
+++ b/main/threadpool.c
@@ -810,6 +810,11 @@ struct ast_threadpool *ast_threadpool_create(const char *name,
return NULL;
}
+ if (options->version != AST_THREADPOOL_OPTIONS_VERSION) {
+ ast_log(LOG_WARNING, "Incompatible version of threadpool options in use.\n");
+ return NULL;
+ }
+
tps = ast_taskprocessor_create_with_listener(name, tps_listener);
if (!tps) {