[ldns-users] Some selective const goodness for tsig

Willem Toorop willem at nlnetlabs.nl
Wed Dec 14 13:46:05 UTC 2016

Thank you Michael,

Both patches applied!


Op 13-12-16 om 00:59 schreef Michael Weiser:
> Hi,
> for ddns I need to use tsig. I track all my strings as const char * as
> much as possible and find it inelegant to have to write something like
> the following, especially since ldns either just stores the pointer and
> never free()s it (ldns_tsig_credentials) or strdup()s it internally
> (ldns_resolver):
> /* they forgot to const them but they strdup them, so all is well */
> ldns_resolver_set_tsig_algorithm(updres, (char *)algop->theirname);
> ldns_resolver_set_tsig_keyname(updres, (char *)keyname);
> ldns_resolver_set_tsig_keydata(updres, (char *)key);
> So I const'ed tsig parameters as much as sensible in the attached patch.
> I'd appreciate if this could be included.
> _______________________________________________
> ldns-users mailing list
> ldns-users at open.nlnetlabs.nl
> https://open.nlnetlabs.nl/mailman/listinfo/ldns-users

More information about the ldns-users mailing list