From 30bb2a0ef23729acb4b5d52d18a186eabe17a305 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 10 Oct 2003 10:50:37 +0000 Subject: [PATCH] Deal with comstack that cannot be created --- src/yaz-pdu-assoc.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- 1.7.10.4