From 779f1d959e8b91db0e259648e6d5597bc2e06736 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 21 Sep 2004 16:28:17 +0000 Subject: [PATCH] Fix saving of SRW query for show. Bug introduced by previous commit so no official YAZ release was affected. --- client/client.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/client/client.c b/client/client.c index d58c082..0f174b5 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.249 2004-09-13 09:24:42 adam Exp $ + * $Id: client.c,v 1.250 2004-09-21 16:28:17 adam Exp $ */ #include @@ -1261,7 +1261,7 @@ static int send_SRW_searchRequest(const char *arg) setno = 1; /* save this for later .. when fetching individual records */ - srw_sr = sr = yaz_srw_get(srw_sr_odr_out, Z_SRW_searchRetrieve_request); + srw_sr = yaz_srw_get(srw_sr_odr_out, Z_SRW_searchRetrieve_request); /* regular request .. */ sr = yaz_srw_get(out, Z_SRW_searchRetrieve_request); @@ -1269,14 +1269,16 @@ static int send_SRW_searchRequest(const char *arg) switch(queryType) { case QueryType_CQL: - sr->u.request->query_type = Z_SRW_query_type_cql; - sr->u.request->query.cql = odr_strdup(srw_sr_odr_out, arg); + srw_sr->u.request->query_type = Z_SRW_query_type_cql; + srw_sr->u.request->query.cql = odr_strdup(srw_sr_odr_out, arg); + sr->u.request->query_type = Z_SRW_query_type_cql; sr->u.request->query.cql = odr_strdup(out, arg); break; case QueryType_Prefix: - sr->u.request->query_type = Z_SRW_query_type_pqf; - sr->u.request->query.pqf = odr_strdup(srw_sr_odr_out, arg); + srw_sr->u.request->query_type = Z_SRW_query_type_pqf; + srw_sr->u.request->query.pqf = odr_strdup(srw_sr_odr_out, arg); + sr->u.request->query_type = Z_SRW_query_type_pqf; sr->u.request->query.pqf = odr_strdup(out, arg); break; -- 1.7.10.4