From: Adam Dickmeiss Date: Tue, 4 Sep 2012 11:19:26 +0000 (+0200) Subject: Avoid host reuse if proxy changes X-Git-Tag: v1.6.17~1 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=cac3198055174f27e4ab70fe17c8b4fc45125d86;p=pazpar2-moved-to-github.git Avoid host reuse if proxy changes --- diff --git a/src/host.c b/src/host.c index 25fd04a..7af0c07 100644 --- a/src/host.c +++ b/src/host.c @@ -99,7 +99,12 @@ struct host *find_host(database_hosts_t hosts, const char *url, yaz_mutex_enter(hosts->mutex); for (p = hosts->hosts; p; p = p->next) if (!strcmp(p->url, url)) - break; + { + if (p->proxy && proxy && !strcmp(p->proxy, proxy)) + break; + if (!p->proxy && !proxy) + break; + } if (!p) { p = create_host(url, proxy, port, iochan_man);