[Asterisk-code-review] res pjsip nat.c: Remove unnecessary CMP STOP. (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Thu Aug 3 16:24:22 CDT 2017


Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/6139


Change subject: res_pjsip_nat.c: Remove unnecessary CMP_STOP.
......................................................................

res_pjsip_nat.c: Remove unnecessary CMP_STOP.

Change-Id: I6279b0d723bc3b75b8d65e81e02da9ea9bc0c3da
---
M res/res_pjsip_nat.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/39/6139/1

diff --git a/res/res_pjsip_nat.c b/res/res_pjsip_nat.c
index 7dfd5ec..45b0d7c 100644
--- a/res/res_pjsip_nat.c
+++ b/res/res_pjsip_nat.c
@@ -35,6 +35,7 @@
 static void rewrite_uri(pjsip_rx_data *rdata, pjsip_sip_uri *uri)
 {
 	pj_cstr(&uri->host, rdata->pkt_info.src_name);
+	uri->port = rdata->pkt_info.src_port;
 	if (!strcasecmp("WSS", rdata->tp_info.transport->type_name)) {
 		/* WSS is special, we don't want to overwrite the URI at all as it needs to be ws */
 	} else if (strcasecmp("udp", rdata->tp_info.transport->type_name)) {
@@ -42,7 +43,6 @@
 	} else {
 		uri->transport_param.slen = 0;
 	}
-	uri->port = rdata->pkt_info.src_port;
 }
 
 static int rewrite_route_set(pjsip_rx_data *rdata, pjsip_dialog *dlg)
@@ -165,7 +165,7 @@
 		((details->type == transport_state->type) && (transport_state->factory) &&
 			!pj_strcmp(&transport_state->factory->addr_name.host, &details->local_address) &&
 			transport_state->factory->addr_name.port == details->local_port))) {
-		return CMP_MATCH | CMP_STOP;
+		return CMP_MATCH;
 	}
 
 	return 0;

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6279b0d723bc3b75b8d65e81e02da9ea9bc0c3da
Gerrit-Change-Number: 6139
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170803/0955460e/attachment.html>


More information about the asterisk-code-review mailing list