From: Mike Taylor Date: Thu, 30 Nov 2006 17:07:50 +0000 (+0000) Subject: Postpone the setting of c->sru_mode until after leading options from X-Git-Tag: YAZ.2.1.42~33 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=31de2e747e8aab81f5de5867e237ec1f0eda5f62;p=yaz-moved-to-github.git Postpone the setting of c->sru_mode until after leading options from host string have been applied. This means that host strings like the following now work correctly in specifying the use of SRU or SRW respectively: sru=get,http:z3950.loc.gov:7090/Voyager sru=soap,http:z3950.loc.gov:7090/Voyager (Previously, these options were set too late to have any effect.) --- diff --git a/src/zoom-c.c b/src/zoom-c.c index 93f807f..61e08a8 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.99 2006-11-20 08:13:05 adam Exp $ + * $Id: zoom-c.c,v 1.100 2006-11-30 17:07:50 mike Exp $ */ /** * \file zoom-c.c @@ -453,9 +453,6 @@ ZOOM_API(void) else c->lang = 0; - val = ZOOM_options_get(c->options, "sru"); - c->sru_mode = get_sru_mode_from_string(val); - xfree(c->host_port); if (portnum) { @@ -497,6 +494,9 @@ ZOOM_API(void) } } + val = ZOOM_options_get(c->options, "sru"); + c->sru_mode = get_sru_mode_from_string(val); + ZOOM_options_set(c->options, "host", c->host_port); val = ZOOM_options_get(c->options, "cookie"); @@ -1276,7 +1276,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c) odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.99 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.100 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion =