char *ipport; /* result or NULL if it could not be resolved */
struct host *host; /* host that we're dealing with - mother thread */
iochan_man_t iochan_man; /* iochan manager */
+ int error;
};
static int log_level = YLOG_LOG;
{
yaz_log(YLOG_WARN, "Failed to resolve %s: %s",
w->hostport, gai_strerror(error));
+ w->error = error;
}
else
{
{
struct work *w = sel_thread_result(p);
w->host->ipport = w->ipport;
+ w->host->error = w->error;
connect_resolver_host(w->host, w->iochan_man);
xfree(w);
}
w->ipport = 0;
w->host = host;
w->iochan_man = iochan_man;
+ w->error = 0;
#if USE_THREADED_RESOLVER
if (use_thread)
{
#endif
perform_getaddrinfo(w);
host->ipport = w->ipport;
+ host->error = w->error;
xfree(w);
if (!host->ipport)
return -1;