mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 00:30:20 +00:00
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:
@@ -1266,6 +1266,7 @@ struct ast_sip_session *ast_sip_session_alloc(struct ast_sip_endpoint *endpoint,
|
||||
RAII_VAR(struct ast_sip_session *, session, NULL, ao2_cleanup);
|
||||
struct ast_sip_session_supplement *iter;
|
||||
int dsp_features = 0;
|
||||
char tps_name[AST_TASKPROCESSOR_MAX_NAME + 1];
|
||||
|
||||
session = ao2_alloc(sizeof(*session), session_destructor);
|
||||
if (!session) {
|
||||
@@ -1286,7 +1287,11 @@ struct ast_sip_session *ast_sip_session_alloc(struct ast_sip_endpoint *endpoint,
|
||||
/* fill session->media with available types */
|
||||
ao2_callback(sdp_handlers, OBJ_NODATA, add_session_media, session);
|
||||
|
||||
session->serializer = ast_sip_create_serializer();
|
||||
/* Create name with seq number appended. */
|
||||
ast_taskprocessor_build_name(tps_name, sizeof(tps_name), "pjsip/session/%s",
|
||||
ast_sorcery_object_get_id(endpoint));
|
||||
|
||||
session->serializer = ast_sip_create_serializer(tps_name);
|
||||
if (!session->serializer) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user