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

Friendly Automation asteriskteam at digium.com
Wed May 26 11:24:17 CDT 2021


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15936 )

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(-)

Approvals:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index 830b038..502ad5b 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -739,6 +739,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) {
 

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ieae0fb98eab2d9257cad996a1136e5a62d307161
Gerrit-Change-Number: 15936
Gerrit-PatchSet: 2
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210526/1875b68d/attachment.html>


More information about the asterisk-code-review mailing list