Hi Bastian,
look like the problem is not generated by the script parameter, but
because of some values extract from the SIP msg (like user and from tag).
please revert the previous patch and apply this new one - it will report
the len of the constructed hdr after each step - it will hep to identify
the bogus value.
regards,
bogdan
Bastian Schern wrote:
Hi Bogdan,
I applied your patch and got that results:
--- snip ---
[...]
0(0) xl_parse_format: format parsed OK: [4] items
0(0) fixing /lib/openser/modules/ record_route_preset
0(0) ***: str ptr=0x8129e50, str len=27, str s=0x8119a30 0(0) fixing
/lib/openser/modules/ xlog
0(0) xl_parse_format: parsing [$Tf: <$fu>;tag=$ft : record_route()
[...]
0(14144) xl_printf: final buffer length 125
0(14144) Fri Feb 3 00:23:20 2006:
<sip:00045977408@sipbase.de>;tag=etlg7wbdxp : record_route_preset(
"217.160.188.74:5060;nat=yes" )
0(14144) ***: str ptr=0x8129e50, str len=27, str s=0x8119a30 0(14144)
record_route_preset(): No memory left
0(14144) parse_headers: flags=200
[...]
0(14144) xl_printf: final buffer length 125
0(14144) Fri Feb 3 00:23:20 2006:
<sip:00045977408@sipbase.de>;tag=etlg7wbdxp : record_route_preset(
"217.160.188.74:5060;nat=yes" )
0(14144) ***: str ptr=0x8129e50, str len=27, str s=0x8119a30 0(14144)
record_route_preset(): No memory left
0(14144) parse_headers: flags=200
0(14144) DEBUG: get_hdr_body : content_length=297
0(14144) found end of header
0(14144) find_first_route: No Route headers found
[...]
--- snap ---
Regards
Bastian
? modules/rr/.record.c.swp
Index: modules/rr/record.c
===================================================================
RCS file: /cvsroot/openser/sip-server/modules/rr/record.c,v
retrieving revision 1.4
diff -u -r1.4 record.c
--- modules/rr/record.c 22 Nov 2005 12:35:30 -0000 1.4
+++ modules/rr/record.c 3 Feb 2006 11:24:19 -0000
@@ -357,12 +357,16 @@
}
hdr_len = RR_PREFIX_LEN;
- if (user.len)
+ if (user.len) {
hdr_len += user.len + 1; /* @ */
+ DBG("***: after adding user, len=%d\n",hdr_len);
+ }
hdr_len += ((str*)_data)->len;
+ DBG("***: after adding IP, len=%d\n",hdr_len);
if (append_fromtag && from->tag_value.len) {
hdr_len += RR_FROMTAG_LEN + from->tag_value.len;
+ DBG("***: after adding fom tag, len=%d\n",hdr_len);
}
if (enable_full_lr) {