From 03ce460f7ed624f0c36274cee763eb86fb2ace88 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 21 Nov 2007 13:53:20 +0000 Subject: [PATCH] Use schema in Z39.50 Update. If schema is given, supply it as part of Z39.50 Extended Service update. Patch from Jacob Poulsen. --- client/client.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/client/client.c b/client/client.c index 53c241b..cbb4870 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.352 2007-10-29 09:16:32 adam Exp $ + * $Id: client.c,v 1.353 2007-11-21 13:53:20 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -2302,6 +2302,12 @@ static int cmd_update_Z3950(int version, int action_no, const char *recid, toKeep->databaseName = databaseNames[0]; toKeep->schema = 0; + if (record_schema) + { + toKeep->schema = yaz_string_to_oid_odr(yaz_oid_std(), + CLASS_SCHEMA, + record_schema, out); + } toKeep->elementSetName = 0; toKeep->action = (int *) odr_malloc(out, sizeof(*toKeep->action)); @@ -2344,6 +2350,12 @@ static int cmd_update_Z3950(int version, int action_no, const char *recid, toKeep->databaseName = databaseNames[0]; toKeep->schema = 0; + if (record_schema) + { + toKeep->schema = yaz_string_to_oid_odr(yaz_oid_std(), + CLASS_SCHEMA, + record_schema, out); + } toKeep->elementSetName = 0; toKeep->actionQualifier = 0; toKeep->action = (int *) odr_malloc(out, sizeof(*toKeep->action)); -- 1.7.10.4