X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-z-assoc.cpp;h=d28ae9480f3f1dce2a3e7ed3dce28b2858947248;hb=b79576d9970810e60bc7b34cc9af56f3139fa5d8;hp=052c059196d6d955fc487152ca1e3ff12cbaa7ee;hpb=966d1a0443071c2b75426d0214bfb9960c5c3fba;p=yazpp-moved-to-github.git diff --git a/src/yaz-z-assoc.cpp b/src/yaz-z-assoc.cpp index 052c059..d28ae94 100644 --- a/src/yaz-z-assoc.cpp +++ b/src/yaz-z-assoc.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Id: yaz-z-assoc.cpp,v 1.22 2001-11-04 22:36:21 adam Exp $ + * $Id: yaz-z-assoc.cpp,v 1.24 2002-09-10 11:30:37 adam Exp $ */ #include @@ -197,7 +197,10 @@ Z_APDU *Yaz_Z_Assoc::decode_Z_PDU(const char *buf, int len) else { if (m_APDU_file) + { z_APDU(m_odr_print, &apdu, 0, "decode"); + fflush(m_APDU_file); + } return apdu; } } @@ -205,9 +208,14 @@ Z_APDU *Yaz_Z_Assoc::decode_Z_PDU(const char *buf, int len) int Yaz_Z_Assoc::encode_Z_PDU(Z_APDU *apdu, char **buf, int *len) { if (m_APDU_file) + { z_APDU(m_odr_print, &apdu, 0, "encode"); + fflush(m_APDU_file); + } if (!z_APDU(m_odr_out, &apdu, 0, 0)) { + if (m_APDU_file) + fprintf (m_APDU_file, "PDU encode failed (above)"); yaz_log (LOG_LOG, "yaz_Z_Assoc::encode_Z_PDU failed"); return -1; }