Hello,
I just apply your patch manually and pushed to master branch -- I had to
add another global parameter and wanted to avoid commit conflicts.
The suggestions for the patch formatting can be used in the future.
Cheers,
Daniel
On 21/04/15 16:48, Daniel-Constantin Mierla wrote:
Hello,
how did you generate the patch? 'git am' returns error:
Patch format detection failed.
Can you use git format patch?
http://git-scm.com/docs/git-format-patch
Or even better, if you have an account on github, create a pull request.
Merging will be easier.
Cheers,
Daniel
On 20/04/15 15:17, smititelu wrote:
>> I haven't implemented the dns cache, typically most of the attributes to
>> configure it are exposed as global parameters. But maybe some of them
>> can be changed only via RPC. There is a module cfg_db which was supposed
>> to allow loading values from database as well, but somehow the developer
>> (which was in the SER project) left and is rather undocumented.
>>
>> The parameters available in so called cfg reload framework can be set
>> via kamcmd, like:
>>
>> kamcmd cfg.set_now_int core cache_rec_pref 1
> I've tried "kamcmd cfg.set_now_int core dns_cache_rec_pref 1". The cmd
> works and the value is changed accordingly. I also tried with other
> params like dns_cache_max_ttl and it works.
>
>> On the other hand, can you try adding in config file:
>>
>> core.cache_rec_pref=1
>>
>> at the beginning, in the part with global parameters?
> I get a config error when setting the core.(dns_)cache_rec_pref=1 in
> config file:
>
> "Apr 20 06:48:03 test-reg1-bs kamailio_3: ERROR: <core>
> [cfg/cfg.c:162]: cfg_declare(): ERROR: register_cfg_def():
> configuration group has been already declared: core
> Apr 20 06:48:03 test-reg1-bs kamailio_3: ERROR: <core>
> [cfg/cfg.c:188]: cfg_declare(): ERROR: register_cfg_def(): Failed to
> register the config group: core
> Apr 20 06:48:03 test-reg1-bs kamailio_3: : <core> [main.c:2407]:
> main(): could not declare the core configuration"
>
> If I try "cfg.cache_rec_pref=1" I get no errors but no effect.
>
>> If you have a patch, send it here or make a pull request on github. It
>> will be accepted.
> I have attached to this mail, the proposed patch which allows
> dns_cache_rec_pref to be set in config file. (i.e. dns_cache_rec_pref=1)
>
> Kind Regards,
> Stefan
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany -
http://www.kamailioworld.com