Quellcode durchsuchen

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).

Carsten Bock vor 15 Jahren
Ursprung
Commit
c114f9fb32
2 geänderte Dateien mit 9 neuen und 6 gelöschten Zeilen
  1. 1 1
      modules_k/dialog/dlg_handlers.c
  2. 8 5
      modules_k/nathelper/rtpproxy_stream.c

+ 1 - 1
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;
 	}

+ 8 - 5
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;