[sr-dev] git:5.3:97d3d11d: nathelper: renamed extract_mediaip() to nh_extract_mediaip()

Daniel-Constantin Mierla miconda at gmail.com
Mon Oct 12 10:37:38 CEST 2020


Module: kamailio
Branch: 5.3
Commit: 97d3d11dbdb736010e9e6f563a9cee58731e0e41
URL: https://github.com/kamailio/kamailio/commit/97d3d11dbdb736010e9e6f563a9cee58731e0e41

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-10-12T10:32:30+02:00

nathelper: renamed extract_mediaip() to nh_extract_mediaip()

- extract_mediaip() is also in core sdp parser

(cherry picked from commit b0f239a2c16b71b8b7e7b325ea121ffc48afa78e)
(cherry picked from commit a989f384b5cb95e096e89899c57d8f11283b12cb)

---

Modified: src/modules/nathelper/nathelper.c

---

Diff:  https://github.com/kamailio/kamailio/commit/97d3d11dbdb736010e9e6f563a9cee58731e0e41.diff
Patch: https://github.com/kamailio/kamailio/commit/97d3d11dbdb736010e9e6f563a9cee58731e0e41.patch

---

diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index 2c5de3b2cf..3a4e79eaae 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -115,7 +115,7 @@ static int pv_get_rr_count_f(struct sip_msg *, pv_param_t *, pv_value_t *);
 static int pv_get_rr_top_count_f(struct sip_msg *, pv_param_t *, pv_value_t *);
 static int fix_nated_sdp_f(struct sip_msg *, char *, char *);
 static int is_rfc1918_f(struct sip_msg *, char *, char *);
-static int extract_mediaip(str *, str *, int *, char *, int);
+static int nh_extract_mediaip(str *, str *, int *, char *, int);
 static int alter_mediaip(struct sip_msg *, str *, str *, int, str *, int, int);
 static int fix_nated_register_f(struct sip_msg *, char *, char *);
 static int fixup_fix_nated_register(void **param, int param_no);
@@ -1589,7 +1589,7 @@ static inline int replace_sdp_ip(
 	}
 	body1 = body;
 	for(;;) {
-		if(extract_mediaip(&body1, &oldip, &pf, line, linelen) == -1)
+		if(nh_extract_mediaip(&body1, &oldip, &pf, line, linelen) == -1)
 			break;
 		if(pf != AF_INET) {
 			LM_ERR("not an IPv4 address in '%s' SDP\n", line);
@@ -1744,7 +1744,8 @@ static int fix_nated_sdp_f(struct sip_msg *msg, char *str1, char *str2)
 	return ki_fix_nated_sdp_ip(msg, level, &ip);
 }
 
-static int extract_mediaip(str *body, str *mediaip, int *pf, char *line, int linelen)
+static int nh_extract_mediaip(str *body, str *mediaip, int *pf, char *line,
+		int linelen)
 {
 	char *cp, *cp1;
 	int len, nextisip;




More information about the sr-dev mailing list