[sr-dev] git:sr_3.0: Backport of the changes (see previous commits).

Carsten Bock carsten at bock.info
Fri Jan 8 10:24:38 CET 2010


Module: sip-router
Branch: sr_3.0
Commit: c114f9fb32ebe33cd7e154975ccd615d5c2598e8
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c114f9fb32ebe33cd7e154975ccd615d5c2598e8

Author: Carsten Bock <carsten at bock.info>
Committer: Carsten Bock <carsten at bock.info>
Date:   Fri Jan  8 10:15:29 2010 +0100

Backport of the changes (see previous commits).
Thanks to Klaus and Juha for reminding me to add the patches here as well (i am new to git and to the new structure).

---

 modules_k/dialog/dlg_handlers.c       |    2 +-
 modules_k/nathelper/rtpproxy_stream.c |   13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/modules_k/dialog/dlg_handlers.c b/modules_k/dialog/dlg_handlers.c
index cd19708..f489a38 100644
--- a/modules_k/dialog/dlg_handlers.c
+++ b/modules_k/dialog/dlg_handlers.c
@@ -226,7 +226,7 @@ int populate_leg_info( struct dlg_cell *dlg, struct sip_msg *msg,
 	contact = ((contact_body_t *)msg->contact->parsed)->contacts->uri;
 
 	/* extract the RR parts */
-	if(!msg->record_route && (parse_headers(msg,HDR_RECORDROUTE_F,0)<0)  ){
+	if(!msg->record_route && (parse_headers(msg,HDR_EOH_F,0)<0)  ){
 		LM_ERR("failed to parse record route header\n");
 		goto error0;
 	}
diff --git a/modules_k/nathelper/rtpproxy_stream.c b/modules_k/nathelper/rtpproxy_stream.c
index 437cc5c..c83bf11 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) {
-            pkg_free(*param);
-            *param = (void *)go_to;
+	/* According to
+	 * http://www.kamailio.org/docs/modules/1.5.x/nathelper.html#rtpproxy_stream2xxx
+	 * this could be -1 */
+	s.s = (char *)(*param);
+	s.len = strlen(s.s);
+	if (str2sint(&s, &ret)==0) {
+		pkg_free(*param);
+		*param = (void *)ret;
         } else {
             LM_ERR("bad number <%s>\n", (char *)(*param));
             return E_CFG;




More information about the sr-dev mailing list