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
This commit is contained in:
Mark Michelson
2013-01-07 22:16:06 +00:00
parent ad73fe2c9f
commit bdd8da406b
5 changed files with 190 additions and 63 deletions

View File

@@ -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;