[sr-dev] Config parser

Olle E. Johansson oej at edvina.net
Mon Mar 28 20:43:36 CEST 2016


> On 28 Mar 2016, at 20:20, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
> 
> Hello,
> 
> have you tried with empty string in between quotes?
> 
> httpproxy=“”
That did the job. Thanks!

Added it to the README.

/O
> 
> 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 <mailto:sr-dev at lists.sip-router.org>
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev>
> 
> -- 
> Daniel-Constantin Mierla
> http://www.asipto.com <http://www.asipto.com/>
> http://twitter.com/#!/miconda <http://twitter.com/#!/miconda> - http://www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
> Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com <http://www.kamailioworld.com/>_______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160328/d02ff8cf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2374 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160328/d02ff8cf/attachment.bin>


More information about the sr-dev mailing list