[Asterisk-code-review] res_pjsip: On partial transport reload also move factories. (asterisk[16])

Joshua Colp asteriskteam at digium.com
Mon May 24 13:39:48 CDT 2021


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15949 )


Change subject: res_pjsip: On partial transport reload also move factories.
......................................................................

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
---
M res/res_pjsip/config_transport.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/49/15949/1

diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index 98fc34f..fb3bdb6 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -559,6 +559,8 @@
 		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++) {

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15949
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ieae0fb98eab2d9257cad996a1136e5a62d307161
Gerrit-Change-Number: 15949
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210524/3de75c86/attachment.html>


More information about the asterisk-code-review mailing list