X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fber_oid.c;h=6e2b5951c6c1f133653654381b741b893ec4a2f0;hp=9a96e521767d6e975373d3d46b5c3875c645e005;hb=c57f145946e02d33035cf27878a3ff618e77d6a2;hpb=88d3bedf772316f87e1996f655ccf8d1e2589755 diff --git a/src/ber_oid.c b/src/ber_oid.c index 9a96e52..6e2b595 100644 --- a/src/ber_oid.c +++ b/src/ber_oid.c @@ -1,9 +1,9 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ -/** +/** * \file ber_oid.c * \brief Implements BER OID encoding and decoding * @@ -25,7 +25,7 @@ int ber_oidc(ODR o, Odr_oid *p, int max_oid_size) switch (o->direction) { case ODR_DECODE: - if ((res = ber_declen(o->bp, &len, odr_max(o))) < 1) + if ((res = ber_declen(o->op->bp, &len, odr_max(o))) < 1) { odr_seterror(o, OPROTO, 18); return 0; @@ -35,7 +35,7 @@ int ber_oidc(ODR o, Odr_oid *p, int max_oid_size) odr_seterror(o, OPROTO, 19); return 0; } - o->bp += res; + o->op->bp += res; if (len > odr_max(o)) { odr_seterror(o, OPROTO, 20); @@ -53,10 +53,10 @@ int ber_oidc(ODR o, Odr_oid *p, int max_oid_size) return 0; } id <<= 7; - id |= *o->bp & 0X7F; + id |= *o->op->bp & 0X7F; len--; } - while (*(o->bp++) & 0X80); + while (*(o->op->bp++) & 0X80); if (id < 0) { @@ -102,7 +102,7 @@ int ber_oidc(ODR o, Odr_oid *p, int max_oid_size) n = 0; if (pos == 1) id = p[0]*40 + p[1]; - else + else id = p[pos]; do { @@ -128,7 +128,7 @@ int ber_oidc(ODR o, Odr_oid *p, int max_oid_size) } odr_seek(o, ODR_S_END, 0); return 1; - default: + default: odr_seterror(o, OOTHER, 22); return 0; }