Module: sip-router
Branch: kamailio_3.0
Commit: 7956c7387a1217016d0e5192e7583e8385b27e14
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7956c73…
Author: Carsten Bock <lists(a)bock.info>
Committer: Carsten Bock <lists(a)bock.info>
Date: Wed Jan 6 16:53:17 2010 +0100
Backport of the changes (see previous commits).
---
modules_k/nathelper/rtpproxy_stream.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules_k/nathelper/rtpproxy_stream.c
b/modules_k/nathelper/rtpproxy_stream.c
index 437cc5c..520bd2d 100644
--- a/modules_k/nathelper/rtpproxy_stream.c
+++ b/modules_k/nathelper/rtpproxy_stream.c
@@ -38,7 +38,6 @@
int
fixup_var_str_int(void **param, int param_no)
{
- unsigned long go_to;
int ret;
pv_elem_t *model;
str s;
@@ -57,10 +56,14 @@ fixup_var_str_int(void **param, int param_no)
}
*param = (void *)model;
} else if (param_no == 2) {
- go_to = str2s(*param, strlen(*param), &ret);
- if (ret == 0) {
+ /* According to
+ *
http://www.kamailio.org/docs/modules/1.5.x/nathelper.html#rtpproxy_stream2x…
+ * this could be -1 */
+ s.s = (char *)(*param);
+ s.len = strlen(s.s);
+ if (str2sint(&s, &ret)==0) {
pkg_free(*param);
- *param = (void *)go_to;
+ *param = (void *)ret;
} else {
LM_ERR("bad number <%s>\n", (char *)(*param));
return E_CFG;