X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=daee88853df3c5f0c8c0179e2269c2c9c4bc52fb;hb=da52cf68299952193806f8093c04e46d1bbf8375;hp=9bbeb1d2a8e98ef94d22ac8f150a65496a3c7c66;hpb=1df74413ba9a51d9cdcfb4ae7b5f32aae0d213e0;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 9bbeb1d..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.218 2003-12-30 00:22:11 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 */ @@ -3446,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;