From 31de2e747e8aab81f5de5867e237ec1f0eda5f62 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 30 Nov 2006 17:07:50 +0000 Subject: [PATCH] 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.) --- src/zoom-c.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 = -- 1.7.10.4