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

Jan Janak jan at ryngle.com
Mon Oct 26 14:44:16 CET 2009


Daniel,

I think you should pull this one into kamailio_3.0 as well.

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



More information about the sr-dev mailing list