How to use "dns_new()" (I get "dns_new: Assertion `(copy->dnsc_flags & DNS_INITED)' failed")
Iñaki Baz Castillo
ibc at aliax.net
Sat Feb 5 00:11:51 MSK 2011
2011/2/4 Michael Tokarev <mjt at tls.msk.ru>:
> The idea is that all the real initialization is done in dns_init() -- this include reading of /etc/resolv.conf, checking environment variables and so on. This is done _only_ for the default context.
But at least in my case, in order to use a context different than the
default one, I must also initialize the new context:
struct dns_ctx *dns_context;
dns_init(NULL, 0);
dns_context = dns_new(NULL);
dns_init(dns_context, 0);
dns_open(dns_context);
If I omit the line "dns_init(dns_context, 0)" then it doesn't work
well (please check my other mail with subject "Problem when non using
default ctx" in which I report it).
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the udns
mailing list