X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsrw.c;h=0618cbdc627154df4f3b07124970f38a4ec9110d;hb=83800da8ab73064cd1031adb7f44d07691f95d55;hp=406af9f27cd62b7a421ef9ab5d3d932abe5f58d8;hpb=7816498d590a66569e6ca8d17e8a4a3723a36826;p=yaz-moved-to-github.git diff --git a/src/srw.c b/src/srw.c index 406af9f..0618cbd 100644 --- a/src/srw.c +++ b/src/srw.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 1995-2005, Index Data ApS + * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: srw.c,v 1.44 2006-03-01 22:33:06 adam Exp $ + * $Id: srw.c,v 1.48 2006-08-18 06:30:05 adam Exp $ */ /** * \file srw.c @@ -10,7 +10,7 @@ */ #include -#if HAVE_XML2 +#if YAZ_HAVE_XML2 #include #include @@ -539,8 +539,7 @@ int yaz_srw_codec(ODR o, void * vptr, Z_SRW_PDU **handler_data, if (method->type != XML_ELEMENT_NODE) return -1; - *p = (Z_SRW_PDU *) odr_malloc(o, sizeof(**p)); - (*p)->srw_version = odr_strdup(o, "1.1"); + *p = yaz_srw_get_core_v_1_1(o); if (!xmlStrcmp(method->name, BAD_CAST "searchRetrieveRequest")) { @@ -966,8 +965,7 @@ int yaz_ucp_codec(ODR o, void * vptr, Z_SRW_PDU **handler_data, if (method->type != XML_ELEMENT_NODE) return -1; - *p = (Z_SRW_PDU *) odr_malloc(o, sizeof(**p)); - (*p)->srw_version = odr_strdup(o, "1.1"); + *p = yaz_srw_get_core_v_1_1(o); if (!xmlStrcmp(method->name, BAD_CAST "updateRequest")) {