res_pjsip: Create human friendly serializer names.

PJSIP name formats:
pjsip/aor/<aor>-<seq> -- registrar thread pool serializer
pjsip/default-<seq> -- default thread pool serializer
pjsip/messaging -- messaging thread pool serializer
pjsip/outreg/<registration>-<seq> -- outbound registration thread pool
serializer
pjsip/pubsub/<endpoint>-<seq> -- pubsub thread pool serializer
pjsip/refer/<endpoint>-<seq> -- REFER thread pool serializer
pjsip/session/<endpoint>-<seq> -- session thread pool serializer
pjsip/websocket-<seq> -- websocket thread pool serializer

Change-Id: Iff9df8da3ddae1132cb2ef65f64df0c465c5e084
This commit is contained in:
Richard Mudgett
2016-01-06 19:10:16 -06:00
parent 4276f185f0
commit cf8e7a580b
9 changed files with 103 additions and 22 deletions

View File

@@ -1234,6 +1234,7 @@ static void subscription_setup_dialog(struct sip_subscription_tree *sub_tree, pj
static struct sip_subscription_tree *allocate_subscription_tree(struct ast_sip_endpoint *endpoint)
{
struct sip_subscription_tree *sub_tree;
char tps_name[AST_TASKPROCESSOR_MAX_NAME + 1];
sub_tree = ao2_alloc(sizeof *sub_tree, subscription_tree_destructor);
if (!sub_tree) {
@@ -1242,7 +1243,11 @@ static struct sip_subscription_tree *allocate_subscription_tree(struct ast_sip_e
ast_module_ref(ast_module_info->self);
sub_tree->serializer = ast_sip_create_serializer();
/* Create name with seq number appended. */
ast_taskprocessor_build_name(tps_name, sizeof(tps_name), "pjsip/pubsub/%s",
ast_sorcery_object_get_id(endpoint));
sub_tree->serializer = ast_sip_create_serializer_named(tps_name);
if (!sub_tree->serializer) {
ao2_ref(sub_tree, -1);
return NULL;