From de70f47f9680c5fd7b3863f2a647d6dc760c2d98 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 12 Jun 2002 19:42:38 +0000 Subject: [PATCH] Deal with Solaris recv that returns ENOENT --- CHANGELOG | 3 +++ comstack/tcpip.c | 5 ++++- util/nmem.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 338d5c9..7042b21 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Possible compatibility problems with earlier versions marked with '*'. --- 1.8.8 2002/MM/DD +Solaris recv sometimes returns errno == ENOENT. It is treated as +EINPROGRESS. COMSTACK patch by Ko van der Sloot. + New COMSTACK of type UNIX Socket. Use "unix:/path" as address for both client and server. Code by Morten Bøgeskov. diff --git a/comstack/tcpip.c b/comstack/tcpip.c index dac5b2a..cb24279 100644 --- a/comstack/tcpip.c +++ b/comstack/tcpip.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: tcpip.c,v 1.46 2002-02-19 20:02:40 adam Exp $ + * $Id: tcpip.c,v 1.47 2002-06-12 19:42:38 adam Exp $ */ #include @@ -679,6 +679,9 @@ int tcpip_get(COMSTACK h, char **buf, int *bufsize) #endif #endif || errno == EINPROGRESS +#ifdef __sun__ + || errno == ENOENT /* Sun's sometimes set errno to this */ +#endif ) { h->io_pending = CS_WANT_READ; diff --git a/util/nmem.c b/util/nmem.c index 375957c..9545471 100644 --- a/util/nmem.c +++ b/util/nmem.c @@ -3,7 +3,7 @@ * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Id: nmem.c,v 1.34 2001-11-18 21:05:13 adam Exp $ + * $Id: nmem.c,v 1.35 2002-06-12 19:42:38 adam Exp $ */ /* @@ -231,8 +231,8 @@ void *nmem_malloc(NMEM n, int size) #endif if (!n) { + yaz_log (LOG_FATAL, "calling nmem_malloc with an null pointer"); abort (); - return xmalloc(size); } #ifdef WIN32 assert (nmem_init_flag); -- 1.7.10.4