summaryrefslogtreecommitdiff
path: root/main/taskprocessor.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-01-07 22:16:06 +0000
committerMark Michelson <mmichelson@digium.com>2013-01-07 22:16:06 +0000
commitbdd8da406bdce8dcb92104f8bcbbb8c42f57646d (patch)
treece70221a9e92a61b362752a40125622e0ac78114 /main/taskprocessor.c
parentad73fe2c9f43c924a4f718884f99787e33eb28b5 (diff)
Address review board feedback from Matt and Richard
* Remove extraneous whitespace * Bump up debug levels of messages and add identifying info to messages. * Account for potential failures of ao2_link() * Add additional test and some more test data * Add some comments in places where they could be useful * Make threadpool listeners and their callbacks optional git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/taskprocessor.c')
-rw-r--r--main/taskprocessor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/taskprocessor.c b/main/taskprocessor.c
index 3ba544292..9b26263bb 100644
--- a/main/taskprocessor.c
+++ b/main/taskprocessor.c
@@ -38,7 +38,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/cli.h"
#include "asterisk/taskprocessor.h"
-
/*!
* \brief tps_task structure is queued to a taskprocessor
*
@@ -560,6 +559,9 @@ struct ast_taskprocessor *ast_taskprocessor_create_with_listener(const char *nam
ao2_ref(p, +1);
listener->tps = p;
+ /* Allocation of private data must come after setting taskprocessor parameters
+ * so that listeners who rely on taskprocessor data will have access to it.
+ */
listener->private_data = listener->callbacks->alloc(listener);
if (!listener->private_data) {
return NULL;