From: Adam Dickmeiss Date: Fri, 10 Oct 2003 10:50:37 +0000 (+0000) Subject: Deal with comstack that cannot be created X-Git-Tag: YAZPP.0.7.1~17 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=30bb2a0ef23729acb4b5d52d18a186eabe17a305;p=yazpp-moved-to-github.git Deal with comstack that cannot be created --- diff --git a/src/yaz-pdu-assoc.cpp b/src/yaz-pdu-assoc.cpp index c6b1668..2b73275 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.31 2003-10-09 12:11:10 adam Exp $ + * $Id: yaz-pdu-assoc.cpp,v 1.32 2003-10-10 10:50:37 adam Exp $ */ #include @@ -428,6 +428,11 @@ void Yaz_PDU_Assoc::connect(IYaz_PDU_Observer *observer, m_PDU_Observer = observer; void *ap; m_cs = comstack(addr, &ap); + if (!m_cs) + { + m_PDU_Observer->failNotify(); + return; + } int res = cs_connect (m_cs, ap); yaz_log (m_log, "Yaz_PDU_Assoc::connect fd=%d res=%d", cs_fileno(m_cs), res);