[sr-dev] git:sr_3.0: parse_sip_msg_uri: Log broken URIs only when debugging is enabled.

Daniel-Constantin Mierla miconda at gmail.com
Tue Oct 27 22:40:29 CET 2009


Hi Jan,

On 26.10.2009 14:44 Uhr, Jan Janak wrote:
> Daniel,
>
> I think you should pull this one into kamailio_3.0 as well.
>   
yes, thanks. Will pull all fixes from sr_3.0.

Cheers,
Daniel

>   -- Jan
>
> On Mon, Oct 26, 2009 at 2:17 PM, Jan Janak <jan at ryngle.com> wrote:
>   
>> Module: sip-router
>> Branch: sr_3.0
>> Commit: 027c5888fcefe56006d6e6cf60335a5c35a45037
>> URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=027c5888fcefe56006d6e6cf60335a5c35a45037
>>
>> Author: Jan Janak <jan at ryngle.com>
>> Committer: Jan Janak <jan at ryngle.com>
>> Date:   Mon Oct 26 14:15:53 2009 +0100
>>
>> parse_sip_msg_uri: Log broken URIs only when debugging is enabled.
>>
>> Logging broken Request-URIs with LOG(L_ERR) generates too much traffic
>> in syslog by default. Broken Request-URIs are beyond our control and
>> we should not generate an error message each time we receive and parse
>> one. We log them only when debugging is enabled.
>>
>> ---
>>
>>  parser/parse_uri.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/parser/parse_uri.c b/parser/parse_uri.c
>> index 5b29710..741258e 100644
>> --- a/parser/parse_uri.c
>> +++ b/parser/parse_uri.c
>> @@ -1397,8 +1397,8 @@ int parse_sip_msg_uri(struct sip_msg* msg)
>>                tmp_len=msg->first_line.u.request.uri.len;
>>        }
>>        if (parse_uri(tmp, tmp_len, &msg->parsed_uri)<0){
>> -               LOG(L_ERR, "ERROR: parse_sip_msg_uri: bad uri <%.*s>\n",
>> -                                       tmp_len, tmp);
>> +               DBG("ERROR: parse_sip_msg_uri: bad uri <%.*s>\n",
>> +                       tmp_len, tmp);
>>                msg->parsed_uri_ok=0;
>>                return -1;
>>        }
>>
>>
>> _______________________________________________
>> sr-dev mailing list
>> sr-dev at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>>     

-- 
Daniel-Constantin Mierla
* Kamailio SIP Masterclass, Nov 9-13, 2009, Berlin
* http://www.asipto.com/index.php/sip-router-masterclass/




More information about the sr-dev mailing list