[ldns-users] ldns patch for ldns-verify-zone to take a time offset

Miek Gieben miek at miek.nl
Tue Nov 1 22:45:20 UTC 2011


[ Quoting <Willem at NLnetLabs.nl> at 23:24 on Nov  1 in "Re: [ldns-users] ldn..." ]
> I am not sure what to do. Similar needs might arise in the future. A
> global modifiable configuration for ldns would be convenient. On the
> other hand, the API currently does not use (configurable) globals. It
> would be more in the style of the current API to pass the check_time
> down. It would also make explicit which functions eventually test
> against "current" time.

I would opt for passing 'check_time' down the API and default it to
be 'current_time'.

The current time is now implicitly used as a global variable defined
by the OS.

Global vars are evil (at least that's what I learned :-) ), and are
IMHO often misused to not break an API, while instead breaking the API
was the correct thing to do.

grtz Miek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20111101/86f5e5af/attachment.bin>


More information about the ldns-users mailing list