X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=daee88853df3c5f0c8c0179e2269c2c9c4bc52fb;hb=983b28466be0739a9408c79624aedb47894504a3;hp=3d5861f75be888a9969b8f919da2116314172949;hpb=fbb6eed845e784c43b0167712787b812ed214152;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 3d5861f..daee888 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.217 2003-12-22 19:46:22 adam Exp $ + * $Id: client.c,v 1.219 2003-12-31 00:14:00 adam Exp $ */ #include @@ -1197,8 +1197,12 @@ static int send_srw(Z_SRW_PDU *sr) char *buf_out; int len_out; int r; - if (apdu_file && !z_GDU(print, &gdu, 0, 0)) - printf ("Failed to print outgoing APDU\n"); + if (apdu_file) + { + if (!z_GDU(print, &gdu, 0, 0)) + printf ("Failed to print outgoing APDU\n"); + odr_reset(print); + } buf_out = odr_getbuf(out, &len_out, 0); /* we don't odr_reset(out), since we may need the buffer again */ @@ -2151,9 +2155,8 @@ static int cmd_explain(const char *arg) send_srw(sr); return 2; } -#else - return 0; #endif + return 0; } static int cmd_find(const char *arg) @@ -3447,7 +3450,10 @@ void wait_and_handle_response() odr_dumpBER(f, netbuffer, res); fprintf(f, "---------\n"); if (apdu_file) + { z_GDU(print, &gdu, 0, 0); + odr_reset(print); + } if (conn && cs_more(conn)) continue; break;