Solve the issue about the "CHANGE THIS" and "XXX CHANGE THIS XXX" taskprocessor names.

Unfortunately, this required a taskprocessor listener change that makes listener allocation
utterly silly. I'm going to change the scheme so that allocation of taskprocessor listeners
is done internally within taskprocessor code. This will make it parallel with threadpool
code, which is a good thing.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2012-12-10 20:14:23 +00:00
parent 90d76a5026
commit 1310e659bd
4 changed files with 39 additions and 28 deletions

View File

@@ -485,10 +485,6 @@ struct ast_taskprocessor_listener *ast_taskprocessor_listener_alloc(const struct
return NULL;
}
listener->callbacks = callbacks;
listener->private_data = listener->callbacks->alloc(listener);
if (!listener->private_data) {
return NULL;
}
ao2_ref(listener, +1);
return listener;
@@ -559,6 +555,11 @@ struct ast_taskprocessor *ast_taskprocessor_create_with_listener(const char *nam
ao2_ref(p, +1);
listener->tps = p;
listener->private_data = listener->callbacks->alloc(listener);
if (!listener->private_data) {
return NULL;
}
if (!(ao2_link(tps_singletons, p))) {
ast_log(LOG_ERROR, "Failed to add taskprocessor '%s' to container\n", p->name);
return NULL;