From cac3198055174f27e4ab70fe17c8b4fc45125d86 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 4 Sep 2012 13:19:26 +0200 Subject: [PATCH] Avoid host reuse if proxy changes --- src/host.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- 1.7.10.4