diff -r 8ddd39bcf2ec -r b972dc20871f opensips/opensips.patch --- a/opensips/opensips.patch Wed Sep 21 14:31:41 2011 +0200 +++ b/opensips/opensips.patch Wed Sep 21 16:06:14 2011 +0200 @@ -2,7 +2,7 @@ diff -Nau main.c.orig main.c --- main.c.orig 2009-12-10 14:11:03.590141302 +0100 +++ main.c 2009-12-10 14:11:07.246237908 +0100 -@@ -1038,6 +1038,10 @@ +@@ -952,6 +952,10 @@ ret=-1; my_argc=argc; my_argv=argv; @@ -13,7 +13,7 @@ /*init pkg mallocs (before parsing cfg or cmd line !)*/ if (init_pkg_mallocs()==-1) goto error00; -@@ -1370,6 +1374,11 @@ +@@ -1284,6 +1288,11 @@ /* init_daemon? */ if (!dont_fork){ @@ -29,7 +29,7 @@ diff -Nau Makefile.defs.orig Makefile.defs --- Makefile.defs.orig 2007-12-13 14:39:06.000000000 +0100 +++ Makefile.defs 2008-01-14 16:48:02.811615000 +0100 -@@ -220,7 +220,7 @@ +@@ -216,7 +216,7 @@ else doc-dir = doc/$(MAIN_NAME)/ man-dir = man/ @@ -38,7 +38,7 @@ LOCALBASE ?= $(SYSBASE)/local endif endif -@@ -1432,6 +1432,10 @@ +@@ -1427,6 +1427,10 @@ LIBS+= -lsctp endif @@ -74,7 +74,7 @@ use IO::Socket; use Socket; #use Net::IP; -@@ -378,6 +377,12 @@ +@@ -396,6 +395,12 @@ } } @@ -119,17 +119,17 @@ diff -Nau modules/nathelper/nathelper.c.orig modules/nathelper/nathelper.c --- modules/nathelper/nathelper.c.orig 2010-12-20 14:33:50.000000000 +0100 +++ modules/nathelper/nathelper.c 2011-01-26 17:48:40.685941382 +0100 -@@ -288,6 +288,9 @@ - return 0; - } +@@ -273,6 +273,9 @@ + #define MI_RECHECK_TICKS "recheck_ticks" + #define MI_RECHECK_T_LEN (sizeof(MI_RECHECK_TICKS)-1) +/* MSvB macros */ +#define OPENSIPS_NOOP ((void)0) + - -@@ -805,6 +808,7 @@ + /* Supported version of the RTP proxy command protocol */ +@@ -1921,6 +1925,7 @@ #define FIX_MEDIP 0x02 #define ADD_ANORTPPROXY 0x04 #define FIX_ORGIP 0x08 @@ -137,7 +137,20 @@ #define ADIRECTION "a=direction:active" #define ADIRECTION_LEN (sizeof(ADIRECTION) - 1) -@@ -821,7 +825,9 @@ +@@ -2050,6 +2055,12 @@ + return -1; + } + ++ if (level & FIX_RTCPIP) { ++ /* Iterate all a=rtcp: and replace ips in them. */ ++ if (replace_sdp_ip(msg, &body, "a=rtcp:", str2?&ip:0)==-1) ++ return -1; ++ } ++ + return 1; + } + +@@ -2215,7 +2226,9 @@ { char *buf; int offset; @@ -147,14 +160,14 @@ str omip, nip, oip; /* check that updating mediaip is really necessary */ -@@ -852,7 +858,19 @@ +@@ -2246,7 +2259,19 @@ memcpy(buf, CRLF, CRLF_LEN); memcpy(buf + CRLF_LEN, omip.s, omip.len); memcpy(buf + CRLF_LEN + omip.len, oldip->s, oldip->len); - if (insert_new_lump_after(anchor, buf, + -+ /* if the oldmediaip string is already */ -+ /* in the body then don't add it again */ ++ /* if the oldmediaip string is already */ ++ /* in the body then don't add it again */ + binlump = 0; + for (templump = msg->body_lumps; templump; templump = templump->next) + if (templump->op == LUMP_ADD && strstr(templump->u.value, buf)) @@ -168,19 +181,6 @@ omip.len + oldip->len + CRLF_LEN, 0) == NULL) { LM_ERR("insert_new_lump_after failed\n"); pkg_free(buf); -@@ -1038,6 +1056,12 @@ - p= p->next; - } - -+ if (level & FIX_RTCPIP) { -+ /* Iterate all a=rtcp: and replace ips in them. */ -+ if (replace_sdp_ip(msg, &body, "a=rtcp:", str2?&ip:0)==-1) -+ return -1; -+ } -+ - return 1; - } - Index: parser/sdp/sdp_helpr_funcs.c diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c --- parser/sdp/sdp_helpr_funcs.c.orig 2010-12-08 15:14:06.000000000 +0100