X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fodr_cons.c;fp=src%2Fodr_cons.c;h=974022196ab126886b920bcac5fde58e41145239;hb=3cef72d7093afaa8b106e4160ef0885b2ac50335;hp=48c327f2bc24fe105b66bd7eed0d99edb5bf96e8;hpb=5d82112ae34413cae5553fc3e3e2c55ce45fc145;p=yaz-moved-to-github.git diff --git a/src/odr_cons.c b/src/odr_cons.c index 48c327f..9740221 100644 --- a/src/odr_cons.c +++ b/src/odr_cons.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_cons.c,v 1.2 2004-08-11 12:15:38 adam Exp $ + * $Id: odr_cons.c,v 1.3 2004-08-13 07:30:06 adam Exp $ * */ #if HAVE_CONFIG_H @@ -43,6 +43,8 @@ int odr_constructed_begin(ODR o, void *p, int zclass, int tag, } o->op->stack[++(o->op->stackp)].lenb = o->bp; o->op->stack[o->op->stackp].len_offset = odr_tell(o); + o->op->stack_names[o->op->stackp] = name ? name : "?"; + o->op->stack_names[o->op->stackp + 1] = 0; #ifdef ODR_DEBUG fprintf(stderr, "[cons_begin(%d)]", o->op->stackp); #endif @@ -54,6 +56,7 @@ int odr_constructed_begin(ODR o, void *p, int zclass, int tag, if (odr_write(o, dummy, lenlen) < 0) /* dummy */ { + o->op->stack_names[o->op->stackp] = 0; --(o->op->stackp); return 0; } @@ -64,6 +67,7 @@ int odr_constructed_begin(ODR o, void *p, int zclass, int tag, odr_max(o))) < 0) { odr_seterror(o, OOTHER, 31); + o->op->stack_names[o->op->stackp] = 0; --(o->op->stackp); return 0; } @@ -72,6 +76,7 @@ int odr_constructed_begin(ODR o, void *p, int zclass, int tag, if (o->op->stack[o->op->stackp].len > odr_max(o)) { odr_seterror(o, OOTHER, 32); + o->op->stack_names[o->op->stackp] = 0; --(o->op->stackp); return 0; } @@ -85,6 +90,7 @@ int odr_constructed_begin(ODR o, void *p, int zclass, int tag, else { odr_seterror(o, OOTHER, 33); + o->op->stack_names[o->op->stackp] = 0; --(o->op->stackp); return 0; } @@ -117,6 +123,7 @@ int odr_constructed_end(ODR o) odr_seterror(o, OOTHER, 34); return 0; } + o->op->stack_names[o->op->stackp] = 0; switch (o->direction) { case ODR_DECODE: