From cf8e7a580bd865ebd563b3eba261111a908bd41a Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Wed, 6 Jan 2016 19:10:16 -0600 Subject: res_pjsip: Create human friendly serializer names. PJSIP name formats: pjsip/aor/- -- registrar thread pool serializer pjsip/default- -- default thread pool serializer pjsip/messaging -- messaging thread pool serializer pjsip/outreg/- -- outbound registration thread pool serializer pjsip/pubsub/- -- pubsub thread pool serializer pjsip/refer/- -- REFER thread pool serializer pjsip/session/- -- session thread pool serializer pjsip/websocket- -- websocket thread pool serializer Change-Id: Iff9df8da3ddae1132cb2ef65f64df0c465c5e084 --- res/res_pjsip_outbound_registration.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'res/res_pjsip_outbound_registration.c') diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c index 4ba57481b..a2fefde8c 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_named(tps_name, + shutdown_group); if (!state->client_state->serializer) { ao2_cleanup(state); return NULL; -- cgit v1.2.3