1.1 --- a/opensips/opensips.patch Wed Sep 21 14:31:41 2011 +0200 1.2 +++ b/opensips/opensips.patch Wed Sep 21 16:06:14 2011 +0200 1.3 @@ -2,7 +2,7 @@ 1.4 diff -Nau main.c.orig main.c 1.5 --- main.c.orig 2009-12-10 14:11:03.590141302 +0100 1.6 +++ main.c 2009-12-10 14:11:07.246237908 +0100 1.7 -@@ -1038,6 +1038,10 @@ 1.8 +@@ -952,6 +952,10 @@ 1.9 ret=-1; 1.10 my_argc=argc; my_argv=argv; 1.11 1.12 @@ -13,7 +13,7 @@ 1.13 /*init pkg mallocs (before parsing cfg or cmd line !)*/ 1.14 if (init_pkg_mallocs()==-1) 1.15 goto error00; 1.16 -@@ -1370,6 +1374,11 @@ 1.17 +@@ -1284,6 +1288,11 @@ 1.18 1.19 /* init_daemon? */ 1.20 if (!dont_fork){ 1.21 @@ -29,7 +29,7 @@ 1.22 diff -Nau Makefile.defs.orig Makefile.defs 1.23 --- Makefile.defs.orig 2007-12-13 14:39:06.000000000 +0100 1.24 +++ Makefile.defs 2008-01-14 16:48:02.811615000 +0100 1.25 -@@ -220,7 +220,7 @@ 1.26 +@@ -216,7 +216,7 @@ 1.27 else 1.28 doc-dir = doc/$(MAIN_NAME)/ 1.29 man-dir = man/ 1.30 @@ -38,7 +38,7 @@ 1.31 LOCALBASE ?= $(SYSBASE)/local 1.32 endif 1.33 endif 1.34 -@@ -1432,6 +1432,10 @@ 1.35 +@@ -1427,6 +1427,10 @@ 1.36 LIBS+= -lsctp 1.37 endif 1.38 1.39 @@ -74,7 +74,7 @@ 1.40 use IO::Socket; 1.41 use Socket; 1.42 #use Net::IP; 1.43 -@@ -378,6 +377,12 @@ 1.44 +@@ -396,6 +395,12 @@ 1.45 } 1.46 } 1.47 1.48 @@ -119,17 +119,17 @@ 1.49 diff -Nau modules/nathelper/nathelper.c.orig modules/nathelper/nathelper.c 1.50 --- modules/nathelper/nathelper.c.orig 2010-12-20 14:33:50.000000000 +0100 1.51 +++ modules/nathelper/nathelper.c 2011-01-26 17:48:40.685941382 +0100 1.52 -@@ -288,6 +288,9 @@ 1.53 - return 0; 1.54 - } 1.55 +@@ -273,6 +273,9 @@ 1.56 + #define MI_RECHECK_TICKS "recheck_ticks" 1.57 + #define MI_RECHECK_T_LEN (sizeof(MI_RECHECK_TICKS)-1) 1.58 1.59 +/* MSvB macros */ 1.60 +#define OPENSIPS_NOOP ((void)0) 1.61 + 1.62 1.63 1.64 - 1.65 -@@ -805,6 +808,7 @@ 1.66 + /* Supported version of the RTP proxy command protocol */ 1.67 +@@ -1921,6 +1925,7 @@ 1.68 #define FIX_MEDIP 0x02 1.69 #define ADD_ANORTPPROXY 0x04 1.70 #define FIX_ORGIP 0x08 1.71 @@ -137,7 +137,20 @@ 1.72 1.73 #define ADIRECTION "a=direction:active" 1.74 #define ADIRECTION_LEN (sizeof(ADIRECTION) - 1) 1.75 -@@ -821,7 +825,9 @@ 1.76 +@@ -2050,6 +2055,12 @@ 1.77 + return -1; 1.78 + } 1.79 + 1.80 ++ if (level & FIX_RTCPIP) { 1.81 ++ /* Iterate all a=rtcp: and replace ips in them. */ 1.82 ++ if (replace_sdp_ip(msg, &body, "a=rtcp:", str2?&ip:0)==-1) 1.83 ++ return -1; 1.84 ++ } 1.85 ++ 1.86 + return 1; 1.87 + } 1.88 + 1.89 +@@ -2215,7 +2226,9 @@ 1.90 { 1.91 char *buf; 1.92 int offset; 1.93 @@ -147,14 +160,14 @@ 1.94 str omip, nip, oip; 1.95 1.96 /* check that updating mediaip is really necessary */ 1.97 -@@ -852,7 +858,19 @@ 1.98 +@@ -2246,7 +2259,19 @@ 1.99 memcpy(buf, CRLF, CRLF_LEN); 1.100 memcpy(buf + CRLF_LEN, omip.s, omip.len); 1.101 memcpy(buf + CRLF_LEN + omip.len, oldip->s, oldip->len); 1.102 - if (insert_new_lump_after(anchor, buf, 1.103 + 1.104 -+ /* if the oldmediaip string is already */ 1.105 -+ /* in the body then don't add it again */ 1.106 ++ /* if the oldmediaip string is already */ 1.107 ++ /* in the body then don't add it again */ 1.108 + binlump = 0; 1.109 + for (templump = msg->body_lumps; templump; templump = templump->next) 1.110 + if (templump->op == LUMP_ADD && strstr(templump->u.value, buf)) 1.111 @@ -168,19 +181,6 @@ 1.112 omip.len + oldip->len + CRLF_LEN, 0) == NULL) { 1.113 LM_ERR("insert_new_lump_after failed\n"); 1.114 pkg_free(buf); 1.115 -@@ -1038,6 +1056,12 @@ 1.116 - p= p->next; 1.117 - } 1.118 - 1.119 -+ if (level & FIX_RTCPIP) { 1.120 -+ /* Iterate all a=rtcp: and replace ips in them. */ 1.121 -+ if (replace_sdp_ip(msg, &body, "a=rtcp:", str2?&ip:0)==-1) 1.122 -+ return -1; 1.123 -+ } 1.124 -+ 1.125 - return 1; 1.126 - } 1.127 - 1.128 Index: parser/sdp/sdp_helpr_funcs.c 1.129 diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c 1.130 --- parser/sdp/sdp_helpr_funcs.c.orig 2010-12-08 15:14:06.000000000 +0100