ttl defaults to 0 when not specified
cross opened this issue · 2 comments
I'm working on a new provider plugin, and see other code checking to see if ttl
is >= 0. And, I see in conf.c
that the default is set to -1. But, it looks like that isn't getting set. In my test config, I have no ttl set in or out of the provider block, and I'm seeing that value as 0 in my runtime.
I don't know confuse, but in looking at it, I'm not sure it will perform default initialization of subsections of the cfg. But again, I've only glanced at it quickly.
Maybe we need a unit test to test the external code meets our expectations?
Do you have any idea if this is a bug in inadyn, or in confuse? I guess we need to figure that out...
Looks like a bug in inadyn. The ttl
setting was added with the CFGF_NODEFAULT
, meaning the default value (-1) was not used. Good catch!
Fixing ...