[sr-dev] git:master: nathelper(k): small code cleanup

Klaus Darilion klaus.mailinglists at pernau.at
Mon Jan 18 11:48:11 CET 2010


Module: sip-router
Branch: master
Commit: a7137d2aeae928fc5b63987537763d41806141dd
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a7137d2aeae928fc5b63987537763d41806141dd

Author: Klaus Darilion <klaus.mailinglists at pernau.at>
Committer: Klaus Darilion <klaus.mailinglists at pernau.at>
Date:   Mon Jan 18 10:45:33 2010 +0000

nathelper(k): small code cleanup

- remove variable "asymmetric" as it is redundant and have same behavior as "real" variable

---

 modules_k/nathelper/nathelper.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules_k/nathelper/nathelper.c b/modules_k/nathelper/nathelper.c
index 90fca05..096816c 100644
--- a/modules_k/nathelper/nathelper.c
+++ b/modules_k/nathelper/nathelper.c
@@ -2801,7 +2801,7 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer)
 	str body, body1, oldport, oldip, newport, newip;
 	str callid, from_tag, to_tag, tmp, payload_types;
 	str oldrtcp, newrtcp;
-	int create, port, len, asymmetric, flookup, argc, proxied, real;
+	int create, port, len, flookup, argc, proxied, real;
 	int orgip, commip;
 	int pf, pf1, force, swap;
 	struct options opts, rep_opts, pt_opts;
@@ -2845,7 +2845,7 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer)
 		LM_ERR("out of pkg memory\n");
 		FORCE_RTP_PROXY_RET (-1);
 	}
-	asymmetric = flookup = force = real = orgip = commip = swap = 0;
+	flookup = force = real = orgip = commip = swap = 0;
 	for (cp = str1; cp != NULL && *cp != '\0'; cp++) {
 		switch (*cp) {
 		case 'a':
@@ -2854,7 +2854,6 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer)
 				LM_ERR("out of pkg memory\n");
 				FORCE_RTP_PROXY_RET (-1);
 			}
-			asymmetric = 1;
 			real = 1;
 			break;
 
@@ -3110,7 +3109,7 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer)
 			extract_rtcp(&tmpstr1, &oldrtcp);
 			
 			++medianum;
-			if (asymmetric != 0 || real != 0) {
+			if (real != 0) {
 				newip = oldip;
 			} else {
 				newip.s = ip_addr2a(&msg->rcv.src_ip);




More information about the sr-dev mailing list