From: Mark Michelson Date: Tue, 11 Dec 2012 16:36:08 +0000 (+0000) Subject: Add threadpool option version check into threadpool creation routine. X-Git-Tag: 13.0.0-beta1~2194^2~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2abda6400324156688b28d818b180940164e6b2c;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/threadpool.c b/main/threadpool.c index b3195fc4cb..663de3b36b 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) {