projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Limit record cache size
[yazpp-moved-to-github.git]
/
src
/
yaz-z-assoc.cpp
diff --git
a/src/yaz-z-assoc.cpp
b/src/yaz-z-assoc.cpp
index
2761220
..
91b47ce
100644
(file)
--- 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.
*
* 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 <assert.h>
*/
#include <assert.h>
@@
-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)
{
Z_APDU *apdu = decode_Z_PDU (buf, len);
if (apdu)
{
- recv_Z_PDU (apdu);
+ recv_Z_PDU (apdu, len);
}
else
{
}
else
{
@@
-169,12
+169,16
@@
void Yaz_Z_Assoc::transfer_referenceId(Z_APDU *from, Z_APDU *to)
*id_to = 0;
}
*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)
{
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 m_PDU_Observable->send_PDU(buf, len);
+ }
return -1;
}
return -1;
}