[Asterisk-code-review] res pjsip session: Correct inverted test in session outgoin... (asterisk[14])

Jenkins2 asteriskteam at digium.com
Wed Jun 14 15:42:37 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5826 )

Change subject: res_pjsip_session:  Correct inverted test in session_outgoing_nat_hook
......................................................................

res_pjsip_session:  Correct inverted test in session_outgoing_nat_hook

There was a typo introduced in commit 776ffd77 which was preventing
the transport's external media address from being used.

ASTERISK-27024 #close
Reported-by: Christopher van de Sande
patches:
	patch.diff submitted by Florian Floimair (license 6892)

Change-Id: I7ec617171eaa2d86d2680b00cf37d5088adafc27
---
M res/res_pjsip_session.c
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index eb0d1f0..ab08ede 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -3155,8 +3155,7 @@
 		ast_sockaddr_parse(&addr, host, PARSE_PORT_FORBID);
 
 		if (!transport_state->localnet
-			|| (transport_state->localnet
-				&& ast_apply_ha(transport_state->localnet, &addr) == AST_SENSE_ALLOW)) {
+			|| ast_apply_ha(transport_state->localnet, &addr) != AST_SENSE_ALLOW) {
 			ast_debug(5, "Setting external media address to %s\n", transport->external_media_address);
 			pj_strdup2(tdata->pool, &sdp->conn->addr, transport->external_media_address);
 		}

-- 
To view, visit https://gerrit.asterisk.org/5826
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ec617171eaa2d86d2680b00cf37d5088adafc27
Gerrit-Change-Number: 5826
Gerrit-PatchSet: 3
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170614/58fce03e/attachment.html>


More information about the asterisk-code-review mailing list