X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fber_int.c;h=eb651e284da6f6132858fd090c0bf09a7f671f5d;hb=0123a5450b4a7eb7e0a52869dd5c099e415f5feb;hp=7717c071765628ecd61956e7e364770d07f5cbce;hpb=69b1d8e7b437179163fe97b7cbead51a56835f2a;p=yaz-moved-to-github.git diff --git a/src/ber_int.c b/src/ber_int.c index 7717c07..eb651e2 100644 --- a/src/ber_int.c +++ b/src/ber_int.c @@ -37,12 +37,12 @@ int ber_integer(ODR o, Odr_int *val) switch (o->direction) { case ODR_DECODE: - if ((res = ber_decinteger(o->bp, val, odr_max(o))) <= 0) + if ((res = ber_decinteger(o->op->bp, val, odr_max(o))) <= 0) { odr_seterror(o, OPROTO, 50); return 0; } - o->bp += res; + o->op->bp += res; return 1; case ODR_ENCODE: if ((res = ber_encinteger(o, *val)) < 0) @@ -77,7 +77,7 @@ int ber_encinteger(ODR o, Odr_int val) len = sizeof(uval) - i; if (ber_enclen(o, len, 1, 1) != 1) return -1; - if (odr_write2(o, (const char *) tmp + i, len) < 0) + if (odr_write(o, (const char *) tmp + i, len) < 0) return -1; return 0; }