diff options
author | Mark Michelson <mmichelson@digium.com> | 2013-01-07 22:16:06 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2013-01-07 22:16:06 +0000 |
commit | bdd8da406bdce8dcb92104f8bcbbb8c42f57646d (patch) | |
tree | ce70221a9e92a61b362752a40125622e0ac78114 /main/taskprocessor.c | |
parent | ad73fe2c9f43c924a4f718884f99787e33eb28b5 (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.c | 4 |
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; |