X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fyaz-z-assoc.cpp;h=91b47ce8942ed5e50026273a0e682f7b87c57d2f;hb=72422e361f3ffd16766ff80bef553de08ea2f741;hp=2761220d6b5c69e9917c139ddcc80a7e21de7f93;hpb=ceb226cb18d96a6b3aa2dd6cff94aa27850362cf;p=yazpp-moved-to-github.git diff --git a/src/yaz-z-assoc.cpp b/src/yaz-z-assoc.cpp index 2761220..91b47ce 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.25 2002-10-09 12:50:26 adam Exp $ + * $Id: yaz-z-assoc.cpp,v 1.26 2003-10-01 13:13:51 adam Exp $ */ #include @@ -78,7 +78,7 @@ void Yaz_Z_Assoc::recv_PDU(const char *buf, int len) Z_APDU *apdu = decode_Z_PDU (buf, len); if (apdu) { - recv_Z_PDU (apdu); + recv_Z_PDU (apdu, len); } else { @@ -169,12 +169,16 @@ void Yaz_Z_Assoc::transfer_referenceId(Z_APDU *from, Z_APDU *to) *id_to = 0; } -int Yaz_Z_Assoc::send_Z_PDU(Z_APDU *apdu) +int Yaz_Z_Assoc::send_Z_PDU(Z_APDU *apdu, int *plen) { char *buf; int len; if (encode_Z_PDU(apdu, &buf, &len) > 0) + { + if (plen) + *plen = len; return m_PDU_Observable->send_PDU(buf, len); + } return -1; }