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;
host->connections = 0;
host->ipport = 0;
host->mutex = 0;
+ host->error = 0;
if (host_getaddrinfo(host, iochan_man))
{
hosts->hosts = p;
}
}
+ if (p && p->error) /* already resolved error */
+ p = 0;
yaz_mutex_leave(hosts->mutex);
xfree(tproxy);
return p;
char *proxy; // logical proxy address
char *ipport; // tproxy or proxy resolved
struct connection *connections; // All connections to this
+ int error; // resolving error
struct host *next;
YAZ_MUTEX mutex;
YAZ_COND cond_ready;