X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fzoom-c.c;h=e7f25c29f4736629fcfc948048e615f59641bd37;hp=b1f5acae27859f76d4231168fe1ffda66f50d014;hb=f3fa080453f6e57618216f6e58d871fb06f0d1b6;hpb=d1b6ed4a27c255041e3d719e4b05ab476c337bbf diff --git a/src/zoom-c.c b/src/zoom-c.c index b1f5aca..e7f25c2 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -361,7 +361,6 @@ ZOOM_API(void) const char *host, int portnum) { const char *val; - const char *http_lead; initlog(); @@ -428,16 +427,18 @@ ZOOM_API(void) else c->lang = 0; - val = ZOOM_options_get(c->options, "sru"); - if (val && *val && !strstr(host, "://")) - http_lead = "http://"; - else - http_lead = ""; - c->sru_mode = get_sru_mode_from_string(val); - if (host) { char hostn[128]; + const char *http_lead; + + val = ZOOM_options_get(c->options, "sru"); + if (val && *val && !strstr(host, "://")) + http_lead = "http://"; + else + http_lead = ""; + c->sru_mode = get_sru_mode_from_string(val); + xfree(c->host_port); if (portnum) { @@ -1063,7 +1064,7 @@ static zoom_ret do_connect_host(ZOOM_connection c, const char *logical_url) if (c->cs) cs_close(c->cs); - c->cs = cs_create_host_proxy(logical_url, 0, &add, + c->cs = cs_create_host_proxy(logical_url, CS_FLAGS_DNS_NO_BLOCK, &add, c->tproxy ? c->tproxy : c->proxy); if (c->cs && c->cs->protocol == PROTO_HTTP)