X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fber_any.c;h=7243e3d050d7e4e56509a81bafdc676eb32b5f63;hp=e167d426a2b5ba1eb6b05dfbb71ef59f86eac2a0;hb=05193e78a2553c93a61da19a39e1276b1a509bac;hpb=c82db01c9fc0b51254ec6ead5fe3b503ca098ca0 diff --git a/src/ber_any.c b/src/ber_any.c index e167d42..7243e3d 100644 --- a/src/ber_any.c +++ b/src/ber_any.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -25,18 +25,15 @@ int ber_any(ODR o, Odr_any **p) switch (o->direction) { case ODR_DECODE: - if ((res = completeBER(o->bp, odr_max(o))) <= 0) /* FIX THIS */ + if ((res = completeBER(o->op->bp, odr_max(o))) <= 0) /* FIX THIS */ { odr_seterror(o, OPROTO, 2); return 0; } (*p)->buf = (char *)odr_malloc(o, res); - memcpy((*p)->buf, o->bp, res); + memcpy((*p)->buf, o->op->bp, res); (*p)->len = res; -#if OCT_SIZE - (*p)->size = res; -#endif - o->bp += res; + o->op->bp += res; return 1; case ODR_ENCODE: if (odr_write(o, (*p)->buf, (*p)->len) < 0)