From 13e7a3ad540a4312b12a1076aa17c29e326a0adf Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 10 Apr 2007 12:14:04 +0000 Subject: [PATCH] Do not use z_ext_getentbyref --- src/yaz-my-client.cpp | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/yaz-my-client.cpp b/src/yaz-my-client.cpp index b21442a..f9a9462 100644 --- a/src/yaz-my-client.cpp +++ b/src/yaz-my-client.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-my-client.cpp,v 1.25 2007-03-20 07:54:11 adam Exp $ + * $Id: yaz-my-client.cpp,v 1.26 2007-04-10 12:14:04 adam Exp $ */ #include @@ -296,35 +296,6 @@ void MyClient::recv_record(Z_DatabaseRecord *record, int offset, if (ent) printf("%s\n", ent->desc); } - /* Check if this is a known, ASN.1 type tucked away in an octet string */ - Z_ext_typeent *etype = z_ext_getentbyref(ent->value); - if (ent && (r->which == Z_External_octet || r->which == Z_External_single) - && (etype = z_ext_getentbyref(ent->value))) - - { - void *rr; - /* - * Call the given decoder to process the record. - */ - odr_setbuf(odr_decode(), (char*)record->u.octet_aligned->buf, - record->u.octet_aligned->len, 0); - if (!(*etype->fun)(odr_decode(), (char **)&rr, 0, 0)) - { - odr_perror(odr_decode(), "Decoding constructed record."); - fprintf(stderr, "[Near %ld]\n", (long) odr_offset(odr_decode())); - fprintf(stderr, "Packet dump:\n---------\n"); - odr_dumpBER(stderr, (char*)record->u.octet_aligned->buf, - record->u.octet_aligned->len); - fprintf(stderr, "---------\n"); - } - if (etype->what == Z_External_sutrs) - { - Z_SUTRS *sutrs = (Z_SUTRS *) rr; - recv_textRecord ((int) VAL_SUTRS, (const char *) sutrs->buf, - (size_t) sutrs->len); - } - return; - } if (r->which == Z_External_octet && record->u.octet_aligned->len) { yaz_marc_t mt = yaz_marc_create(); -- 1.7.10.4