diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-01-06 19:10:16 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-01-08 22:11:45 -0600 |
commit | 0bca2a5c26bae18dadc368e22dbbeae6b61c5cd7 (patch) | |
tree | b46d6d10a987e964393bdfa18048e74eb5722af9 /res/res_pjsip_registrar.c | |
parent | f0f5fbbc01ad2ba325f09dc80a92c3c22374ab67 (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_registrar.c')
-rw-r--r-- | res/res_pjsip_registrar.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c index b9ad0ea60..accb16137 100644 --- a/res/res_pjsip_registrar.c +++ b/res/res_pjsip_registrar.c @@ -231,6 +231,7 @@ static void serializer_destroy(void *obj) static struct serializer *serializer_create(const char *aor_name) { + char tps_name[AST_TASKPROCESSOR_MAX_NAME + 1]; size_t size = strlen(aor_name) + 1; struct serializer *ser = ao2_alloc( sizeof(*ser) + size, serializer_destroy); @@ -239,7 +240,11 @@ static struct serializer *serializer_create(const char *aor_name) return NULL; } - if (!(ser->serializer = ast_sip_create_serializer())) { + /* Create name with seq number appended. */ + ast_taskprocessor_build_name(tps_name, sizeof(tps_name), "pjsip/aor/%s", + aor_name); + + if (!(ser->serializer = ast_sip_create_serializer(tps_name))) { ao2_ref(ser, -1); return NULL; } |