1 Index: main.c |
1 Index: main.c |
2 diff -Nau main.c.orig main.c |
2 diff -Nau main.c.orig main.c |
3 --- main.c.orig 2009-12-10 14:11:03.590141302 +0100 |
3 --- main.c.orig 2009-12-10 14:11:03.590141302 +0100 |
4 +++ main.c 2009-12-10 14:11:07.246237908 +0100 |
4 +++ main.c 2009-12-10 14:11:07.246237908 +0100 |
5 @@ -952,6 +952,10 @@ |
5 @@ -1038,6 +1038,10 @@ |
6 ret=-1; |
6 ret=-1; |
7 my_argc=argc; my_argv=argv; |
7 my_argc=argc; my_argv=argv; |
8 |
8 |
9 + /* if (!log_stderr), that's not usable yet! '/ |
9 + /* if (!log_stderr), that's not usable yet! '/ |
10 + /* ...so unconditionally log to syslog for now */ |
10 + /* ...so unconditionally log to syslog for now */ |
11 + openlog(argv[0], LOG_PID|LOG_CONS, log_facility); |
11 + openlog(argv[0], LOG_PID|LOG_CONS, log_facility); |
12 + |
12 + |
13 /*init pkg mallocs (before parsing cfg or cmd line !)*/ |
13 /*init pkg mallocs (before parsing cfg or cmd line !)*/ |
14 if (init_pkg_mallocs()==-1) |
14 if (init_pkg_mallocs()==-1) |
15 goto error00; |
15 goto error00; |
16 @@ -1284,6 +1288,11 @@ |
16 @@ -1370,6 +1374,11 @@ |
17 |
17 |
18 /* init_daemon? */ |
18 /* init_daemon? */ |
19 if (!dont_fork){ |
19 if (!dont_fork){ |
20 + /* shortly after main() we called openlog(3) to log */ |
20 + /* shortly after main() we called openlog(3) to log */ |
21 + /* the initialization, but since daemonize() has its */ |
21 + /* the initialization, but since daemonize() has its */ |
27 } |
27 } |
28 Index: Makefile.defs |
28 Index: Makefile.defs |
29 diff -Nau Makefile.defs.orig Makefile.defs |
29 diff -Nau Makefile.defs.orig Makefile.defs |
30 --- Makefile.defs.orig 2007-12-13 14:39:06.000000000 +0100 |
30 --- Makefile.defs.orig 2007-12-13 14:39:06.000000000 +0100 |
31 +++ Makefile.defs 2008-01-14 16:48:02.811615000 +0100 |
31 +++ Makefile.defs 2008-01-14 16:48:02.811615000 +0100 |
32 @@ -216,7 +216,7 @@ |
32 @@ -220,7 +220,7 @@ |
33 else |
33 else |
34 doc-dir = doc/$(MAIN_NAME)/ |
34 doc-dir = doc/$(MAIN_NAME)/ |
35 man-dir = man/ |
35 man-dir = man/ |
36 - data-dir = $(MAIN_NAME)/ |
36 - data-dir = $(MAIN_NAME)/ |
37 + data-dir = share/$(MAIN_NAME)/ |
37 + data-dir = share/$(MAIN_NAME)/ |
38 LOCALBASE ?= $(SYSBASE)/local |
38 LOCALBASE ?= $(SYSBASE)/local |
39 endif |
39 endif |
40 endif |
40 endif |
41 @@ -1427,6 +1427,10 @@ |
41 @@ -1432,6 +1432,10 @@ |
42 LIBS+= -lsctp |
42 LIBS+= -lsctp |
43 endif |
43 endif |
44 |
44 |
45 +#conditionally add libfsl |
45 +#conditionally add libfsl |
46 +LDFLAGS += -L$(prefix)/lib |
46 +LDFLAGS += -L$(prefix)/lib |
117 |
117 |
118 Index: modules/nathelper/nathelper.c |
118 Index: modules/nathelper/nathelper.c |
119 diff -Nau modules/nathelper/nathelper.c.orig modules/nathelper/nathelper.c |
119 diff -Nau modules/nathelper/nathelper.c.orig modules/nathelper/nathelper.c |
120 --- modules/nathelper/nathelper.c.orig 2010-12-20 14:33:50.000000000 +0100 |
120 --- modules/nathelper/nathelper.c.orig 2010-12-20 14:33:50.000000000 +0100 |
121 +++ modules/nathelper/nathelper.c 2011-01-26 17:48:40.685941382 +0100 |
121 +++ modules/nathelper/nathelper.c 2011-01-26 17:48:40.685941382 +0100 |
122 @@ -273,6 +273,9 @@ |
122 @@ -288,6 +288,9 @@ |
123 #define MI_RECHECK_TICKS "recheck_ticks" |
123 return 0; |
124 #define MI_RECHECK_T_LEN (sizeof(MI_RECHECK_TICKS)-1) |
124 } |
125 |
125 |
126 +/* MSvB macros */ |
126 +/* MSvB macros */ |
127 +#define OPENSIPS_NOOP ((void)0) |
127 +#define OPENSIPS_NOOP ((void)0) |
128 + |
128 + |
129 |
129 |
130 |
130 |
131 /* Supported version of the RTP proxy command protocol */ |
131 |
132 @@ -1921,6 +1925,7 @@ |
132 @@ -805,6 +808,7 @@ |
133 #define FIX_MEDIP 0x02 |
133 #define FIX_MEDIP 0x02 |
134 #define ADD_ANORTPPROXY 0x04 |
134 #define ADD_ANORTPPROXY 0x04 |
135 #define FIX_ORGIP 0x08 |
135 #define FIX_ORGIP 0x08 |
136 +#define FIX_RTCPIP 0x10 |
136 +#define FIX_RTCPIP 0x10 |
137 |
137 |
138 #define ADIRECTION "a=direction:active" |
138 #define ADIRECTION "a=direction:active" |
139 #define ADIRECTION_LEN (sizeof(ADIRECTION) - 1) |
139 #define ADIRECTION_LEN (sizeof(ADIRECTION) - 1) |
140 @@ -2050,6 +2055,12 @@ |
140 @@ -821,7 +825,9 @@ |
141 return -1; |
|
142 } |
|
143 |
|
144 + if (level & FIX_RTCPIP) { |
|
145 + /* Iterate all a=rtcp: and replace ips in them. */ |
|
146 + if (replace_sdp_ip(msg, &body, "a=rtcp:", str2?&ip:0)==-1) |
|
147 + return -1; |
|
148 + } |
|
149 + |
|
150 return 1; |
|
151 } |
|
152 |
|
153 @@ -2215,7 +2226,9 @@ |
|
154 { |
141 { |
155 char *buf; |
142 char *buf; |
156 int offset; |
143 int offset; |
157 + int binlump; |
144 + int binlump; |
158 struct lump* anchor; |
145 struct lump* anchor; |
159 + struct lump* templump; |
146 + struct lump* templump; |
160 str omip, nip, oip; |
147 str omip, nip, oip; |
161 |
148 |
162 /* check that updating mediaip is really necessary */ |
149 /* check that updating mediaip is really necessary */ |
163 @@ -2246,7 +2259,19 @@ |
150 @@ -852,7 +858,19 @@ |
164 memcpy(buf, CRLF, CRLF_LEN); |
151 memcpy(buf, CRLF, CRLF_LEN); |
165 memcpy(buf + CRLF_LEN, omip.s, omip.len); |
152 memcpy(buf + CRLF_LEN, omip.s, omip.len); |
166 memcpy(buf + CRLF_LEN + omip.len, oldip->s, oldip->len); |
153 memcpy(buf + CRLF_LEN + omip.len, oldip->s, oldip->len); |
167 - if (insert_new_lump_after(anchor, buf, |
154 - if (insert_new_lump_after(anchor, buf, |
168 + |
155 + |
169 + /* if the oldmediaip string is already */ |
156 + /* if the oldmediaip string is already */ |
170 + /* in the body then don't add it again */ |
157 + /* in the body then don't add it again */ |
171 + binlump = 0; |
158 + binlump = 0; |
172 + for (templump = msg->body_lumps; templump; templump = templump->next) |
159 + for (templump = msg->body_lumps; templump; templump = templump->next) |
173 + if (templump->op == LUMP_ADD && strstr(templump->u.value, buf)) |
160 + if (templump->op == LUMP_ADD && strstr(templump->u.value, buf)) |
174 + binlump = 1; |
161 + binlump = 1; |
175 + for (templump = msg->add_rm; templump; templump = templump->next) |
162 + for (templump = msg->add_rm; templump; templump = templump->next) |
179 + pkg_free(buf); |
166 + pkg_free(buf); |
180 + else if (insert_new_lump_after(anchor, buf, |
167 + else if (insert_new_lump_after(anchor, buf, |
181 omip.len + oldip->len + CRLF_LEN, 0) == NULL) { |
168 omip.len + oldip->len + CRLF_LEN, 0) == NULL) { |
182 LM_ERR("insert_new_lump_after failed\n"); |
169 LM_ERR("insert_new_lump_after failed\n"); |
183 pkg_free(buf); |
170 pkg_free(buf); |
|
171 @@ -1038,6 +1056,12 @@ |
|
172 p= p->next; |
|
173 } |
|
174 |
|
175 + if (level & FIX_RTCPIP) { |
|
176 + /* Iterate all a=rtcp: and replace ips in them. */ |
|
177 + if (replace_sdp_ip(msg, &body, "a=rtcp:", str2?&ip:0)==-1) |
|
178 + return -1; |
|
179 + } |
|
180 + |
|
181 return 1; |
|
182 } |
|
183 |
184 Index: parser/sdp/sdp_helpr_funcs.c |
184 Index: parser/sdp/sdp_helpr_funcs.c |
185 diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c |
185 diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c |
186 --- parser/sdp/sdp_helpr_funcs.c.orig 2010-12-08 15:14:06.000000000 +0100 |
186 --- parser/sdp/sdp_helpr_funcs.c.orig 2010-12-08 15:14:06.000000000 +0100 |
187 +++ parser/sdp/sdp_helpr_funcs.c 2011-01-27 00:39:50.128212053 +0100 |
187 +++ parser/sdp/sdp_helpr_funcs.c 2011-01-27 00:39:50.128212053 +0100 |
188 @@ -392,7 +392,7 @@ |
188 @@ -392,7 +392,7 @@ |