X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-pdu-assoc.cpp;h=203ba34024dc922aa22082a9eff74b0e86eb0e93;hb=b51e13a9b732fe2ca93044776d5e990dbf2a4c0e;hp=0ed6f2955489aca54c62d3b49e126f419e683be9;hpb=966d1a0443071c2b75426d0214bfb9960c5c3fba;p=yazpp-moved-to-github.git diff --git a/src/yaz-pdu-assoc.cpp b/src/yaz-pdu-assoc.cpp index 0ed6f29..203ba34 100644 --- a/src/yaz-pdu-assoc.cpp +++ b/src/yaz-pdu-assoc.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Id: yaz-pdu-assoc.cpp,v 1.25 2001-11-04 22:36:21 adam Exp $ + * $Id: yaz-pdu-assoc.cpp,v 1.28 2002-10-09 12:50:26 adam Exp $ */ #include @@ -10,7 +10,7 @@ #include #include -#include +#include void Yaz_PDU_Assoc::init(IYazSocketObservable *socketObservable) @@ -124,8 +124,8 @@ void Yaz_PDU_Assoc::socketNotify(int event) } else { - yaz_log (m_log, "cs_connect again"); - int res = cs_connect (m_cs, 0); + yaz_log (m_log, "cs_rcvconnect"); + int res = cs_rcvconnect (m_cs); if (res == 1) { unsigned mask = YAZ_SOCKET_OBSERVE_EXCEPT; @@ -286,7 +286,7 @@ void Yaz_PDU_Assoc::destroy() Yaz_PDU_Assoc::PDU_Queue::PDU_Queue(const char *buf, int len) { - m_buf = (char *) malloc (len); + m_buf = (char *) xmalloc (len); memcpy (m_buf, buf, len); m_len = len; m_next = 0; @@ -294,7 +294,7 @@ Yaz_PDU_Assoc::PDU_Queue::PDU_Queue(const char *buf, int len) Yaz_PDU_Assoc::PDU_Queue::~PDU_Queue() { - free (m_buf); + xfree (m_buf); } int Yaz_PDU_Assoc::flush_PDU() @@ -420,7 +420,7 @@ void Yaz_PDU_Assoc::connect(IYaz_PDU_Observer *observer, m_socketObservable->addObserver(cs_fileno(m_cs), this); if (res >= 0) - { // Connect pending or complet + { // Connect pending or complete m_state = Connecting; unsigned mask = YAZ_SOCKET_OBSERVE_EXCEPT; if (m_cs->io_pending & CS_WANT_WRITE) @@ -441,8 +441,6 @@ void Yaz_PDU_Assoc::connect(IYaz_PDU_Observer *observer, // Single-threaded... Only useful for non-blocking handlers void Yaz_PDU_Assoc::childNotify(COMSTACK cs) { - - Yaz_PDU_Assoc *new_observable = new Yaz_PDU_Assoc (m_socketObservable, cs);