mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 06:53:41 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user