summaryrefslogtreecommitdiff
path: root/res/res_pjsip_outbound_registration.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-01-06 19:10:16 -0600
committerRichard Mudgett <rmudgett@digium.com>2016-01-08 22:11:45 -0600
commit0bca2a5c26bae18dadc368e22dbbeae6b61c5cd7 (patch)
treeb46d6d10a987e964393bdfa18048e74eb5722af9 /res/res_pjsip_outbound_registration.c
parentf0f5fbbc01ad2ba325f09dc80a92c3c22374ab67 (diff)
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
Diffstat (limited to 'res/res_pjsip_outbound_registration.c')
-rw-r--r--res/res_pjsip_outbound_registration.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c
index 88007d1d2..267ca5d77 100644
--- a/res/res_pjsip_outbound_registration.c
+++ b/res/res_pjsip_outbound_registration.c
@@ -977,6 +977,7 @@ static void sip_outbound_registration_client_state_destroy(void *obj)
static struct sip_outbound_registration_state *sip_outbound_registration_state_alloc(struct sip_outbound_registration *registration)
{
struct sip_outbound_registration_state *state;
+ char tps_name[AST_TASKPROCESSOR_MAX_NAME + 1];
state = ao2_alloc(sizeof(*state), sip_outbound_registration_state_destroy);
if (!state) {
@@ -989,7 +990,12 @@ static struct sip_outbound_registration_state *sip_outbound_registration_state_a
return NULL;
}
- state->client_state->serializer = ast_sip_create_serializer_group(shutdown_group);
+ /* Create name with seq number appended. */
+ ast_taskprocessor_build_name(tps_name, sizeof(tps_name), "pjsip/outreg/%s",
+ ast_sorcery_object_get_id(registration));
+
+ state->client_state->serializer = ast_sip_create_serializer_group(tps_name,
+ shutdown_group);
if (!state->client_state->serializer) {
ao2_cleanup(state);
return NULL;