[sr-dev] Config parser

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 28 20:20:39 CEST 2016


Hello,

have you tried with empty string in between quotes?

httpproxy=""

Alternative is to use boolean in this case.

httpproxy=no

Of course, there is always to patch the code and add support for empty
value (or eventual 'null' value).

Cheers,
Daniel

On 28/03/16 19:31, Olle E. Johansson wrote:
> Hi!
>
> Http_client is using the cfg_parser.c core parser to parse the config file. In some cases I would like to set an empty string. Let’s say that I’ve set a default http proxy in modparams and wants to reset it to no proxy in the config file - in this case I would like to write
>
>
> httpproxy=
>
> on a line in the config file.
>
> In this case I get 
>
>  0(45371) ERROR: <core> [cfg_parser.c:891]: cfg_parse_str(): http_client.cfg:35:0: Invalid string value '
> ', a string expected.
>
> Is there a way to allow an empty string?
>
> /O
>
>
> _______________________________________________
> 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
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160328/3cfaa630/attachment.html>


More information about the sr-dev mailing list