From: Joshua C. Colp Date: Mon, 24 May 2021 18:38:26 +0000 (-0300) Subject: res_pjsip: On partial transport reload also move factories. X-Git-Tag: 16.19.0-rc1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e07fd35238c2ef3cdc895a599eb7f14c5a3d3c42;p=thirdparty%2Fasterisk.git res_pjsip: On partial transport reload also move factories. For connection oriented transports PJSIP uses factories to produce transports. When doing a partial transport reload we need to also move the factory of the transport over so that anything referencing the transport (such as an endpoint) has the factory available. ASTERISK-29441 Change-Id: Ieae0fb98eab2d9257cad996a1136e5a62d307161 --- diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c index 98fc34fd53..fb3bdb6091 100644 --- a/res/res_pjsip/config_transport.c +++ b/res/res_pjsip/config_transport.c @@ -559,6 +559,8 @@ static int transport_apply(const struct ast_sorcery *sorcery, void *obj) ast_log(LOG_WARNING, "Transport '%s' is not fully reloadable, not reloading: protocol, bind, TLS, TCP, ToS, or CoS options.\n", transport_id); temp_state->state->transport = perm_state->state->transport; perm_state->state->transport = NULL; + temp_state->state->factory = perm_state->state->factory; + perm_state->state->factory = NULL; res = PJ_SUCCESS; } else if (transport->type == AST_TRANSPORT_UDP) { for (i = 0; i < BIND_TRIES && res != PJ_SUCCESS; i++) {