From: Adam Dickmeiss Date: Mon, 5 Jan 2004 14:46:52 +0000 (+0000) Subject: Allow empty ODR (NMEM=0) for odr_oiddup and odr_getoidbystr. X-Git-Tag: YAZ.2.0.9.3~6 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=983b28466be0739a9408c79624aedb47894504a3;p=yaz-moved-to-github.git Allow empty ODR (NMEM=0) for odr_oiddup and odr_getoidbystr. --- diff --git a/CHANGELOG b/CHANGELOG index 863de7f..776618d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ Possible compatibility problems with earlier versions marked with '*'. +--- 2.0.9-2 2004/01/05 Debian only + +Allow empty ODR (NMEM=0) for odr_oiddup and odr_getoidbystr. + Fix bug in SRW/SRU diagnostics decoding. --- 2.0.9 2004/01/05 diff --git a/debian/changelog b/debian/changelog index 661831c..278a7b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yaz (2.0.9-2) unstable; urgency=low + + * Upstream. + + -- Adam Dickmeiss Mon, 5 Jan 2004 15:46:06 +0100 + yaz (2.0.9-1) unstable; urgency=low * Upstream. diff --git a/src/odr_util.c b/src/odr_util.c index bb1955c..2566143 100644 --- a/src/odr_util.c +++ b/src/odr_util.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 1995-2003, Index Data + * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: odr_util.c,v 1.2 2003-11-26 16:23:42 mike Exp $ + * $Id: odr_util.c,v 1.3 2004-01-05 14:46:52 adam Exp $ */ #if HAVE_CONFIG_H #include @@ -54,6 +54,8 @@ Odr_oid *odr_oiddup_nmem(NMEM nmem, Odr_oid *o) Odr_oid *odr_oiddup(ODR odr, Odr_oid *o) { + if (!odr->mem) + odr->mem = nmem_create(); return odr_oiddup_nmem (odr->mem, o); } @@ -78,6 +80,8 @@ Odr_oid *odr_getoidbystr_nmem(NMEM nmem, const char *str) Odr_oid *odr_getoidbystr(ODR o, const char *str) { + if (!o->mem) + o->mem = nmem_create(); return odr_getoidbystr_nmem (o->mem, str); } diff --git a/src/srw.c b/src/srw.c index e3f4d72..9bce1b7 100644 --- a/src/srw.c +++ b/src/srw.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 2002-2003, Index Data. + * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: srw.c,v 1.12 2004-01-05 14:05:56 adam Exp $ + * $Id: srw.c,v 1.13 2004-01-05 14:46:52 adam Exp $ */ #include