[Users] record_route_preset(): No memory left

Bastian Schern ml02 at in-bln.de
Sat Feb 4 01:12:01 CET 2006


Hi Bogdan,

i applied the new patch to record.c and got these results:

--- snip ---

  0(29780) xl_printf: final buffer length 125
  0(29780) Sat Feb  4 00:04:31 2006: 
<sip:00045977408 at sipbase.de>;tag=q1snnhms5k : record_route_preset( 
"217.160.188.74:5060;nat=yes" )
  0(29780) ***: after adding user, len=1074334712
  0(29780) ***: after adding IP, len=1074334739
  0(29780) ***: after adding fom tag, len=1074334755
  0(29780) record_route_preset(): No memory left
  0(29780) parse_headers: flags=200
  0(29780) DEBUG: get_hdr_body : content_length=295
  0(29780) found end of header

[...]

  0(29780) parse_headers: flags=80
  0(29780) xl_printf: final buffer length 125
  0(29780) Sat Feb  4 00:04:31 2006: 
<sip:00045977408 at sipbase.de>;tag=q1snnhms5k : record_route_preset( 
"217.160.188.74:5060;nat=yes" )
  0(29780) ***: after adding user, len=1074334712
  0(29780) ***: after adding IP, len=1074334739
  0(29780) ***: after adding fom tag, len=1074334755
  0(29780) record_route_preset(): No memory left
  0(29780) parse_headers: flags=200
  0(29780) DEBUG: get_hdr_body : content_length=295
  0(29780) found end of header

--- snap ---

It looks like there is a problem with the user. Could it be that the 
tailing "000" are the problem?

Regards
	Bastian


Bogdan-Andrei Iancu schrieb:
> 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 at 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 at 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) {


____________
Virus checked by G DATA AntiVirusKit
Version: AVK 16.5268 from 03.02.2006
Virus news: www.antiviruslab.com






More information about the Users mailing list