X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=ztest%2Fread-grs.c;h=97123e30252cdb31d1fc4980b552b4d8b9465607;hp=27510464aba3a8394f2d4b7993cc5558184a847c;hb=8d08fd5b79e49e14ca014de8e6bed12a2cc0468d;hpb=5dd6504c984a2f87427aa0fba13a07421d1cb50b diff --git a/ztest/read-grs.c b/ztest/read-grs.c index 2751046..97123e3 100644 --- a/ztest/read-grs.c +++ b/ztest/read-grs.c @@ -1,10 +1,12 @@ /* - * Copyright (c) 1995-1999, Index Data. + * Copyright (c) 1995-2001, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: read-grs.c,v $ - * Revision 1.5 1999-11-30 13:47:12 adam + * Revision 1.6 2001-03-25 21:55:13 adam + * Added odr_intdup. Ztest server returns TaskPackage for ItemUpdate. + * + * Revision 1.5 1999/11/30 13:47:12 adam * Improved installation. Moved header files to include/yaz. * * Revision 1.4 1999/08/27 09:40:32 adam @@ -86,15 +88,13 @@ Z_GenericRecord *read_grs1(FILE *f, ODR o) } r->elements[r->num_elements] = t = (Z_TaggedElement *) odr_malloc(o, sizeof(Z_TaggedElement)); - t->tagType = (int *)odr_malloc(o, sizeof(int)); - *t->tagType = type; + t->tagType = odr_intdup(o, type); t->tagValue = (Z_StringOrNumeric *) odr_malloc(o, sizeof(Z_StringOrNumeric)); if ((ivalue = atoi(value))) { t->tagValue->which = Z_StringOrNumeric_numeric; - t->tagValue->u.numeric = (int *)odr_malloc(o, sizeof(int)); - *t->tagValue->u.numeric = ivalue; + t->tagValue->u.numeric = odr_intdup(o, ivalue); } else {