From: Sebastian Hammer Date: Wed, 18 Oct 1995 16:12:30 +0000 (+0000) Subject: Better diagnostics. X-Git-Tag: YAZ.1.8~895 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=cd5d6beb85878bfc65a2ebd2b771b86a1872af40 Better diagnostics. --- diff --git a/client/client.c b/client/client.c index fd12e2d..f1f3c58 100644 --- a/client/client.c +++ b/client/client.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: client.c,v $ - * Revision 1.22 1995-10-11 14:49:12 quinn + * Revision 1.23 1995-10-18 16:12:30 quinn + * Better diagnostics. + * + * Revision 1.22 1995/10/11 14:49:12 quinn * Smallish. * * Revision 1.21 1995/09/29 17:01:47 quinn @@ -1002,6 +1005,7 @@ static int client(void) if (!z_APDU(in, &apdu, 0)) { odr_perror(in, "Decoding incoming APDU"); + fprintf(stderr, "[Near %d]\n", odr_offset(in)); fprintf(stderr, "Packet dump:\n---------\n"); odr_dumpBER(stderr, netbuffer, res); fprintf(stderr, "---------\n"); diff --git a/include/odr.h b/include/odr.h index 2c88189..8bfc445 100644 --- a/include/odr.h +++ b/include/odr.h @@ -24,7 +24,10 @@ * OF THIS SOFTWARE. * * $Log: odr.h,v $ - * Revision 1.14 1995-09-29 17:12:04 quinn + * Revision 1.15 1995-10-18 16:12:36 quinn + * Better diagnostics. + * + * Revision 1.14 1995/09/29 17:12:04 quinn * Smallish * * Revision 1.13 1995/09/29 17:01:49 quinn @@ -347,6 +350,7 @@ void odr_release_mem(ODR_MEM p); ) \ #define odr_tell(o) ((o)->ecb.pos) +#define odr_offset(o) ((o)->bp - (o)->buf) #define odr_ok(o) (!(o)->error) #define ODR_MAXNAME 256