From: Adam Dickmeiss Date: Wed, 12 Jun 2002 19:42:38 +0000 (+0000) Subject: Deal with Solaris recv that returns ENOENT X-Git-Tag: YAZ.1.8.8~33 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=de70f47f9680c5fd7b3863f2a647d6dc760c2d98 Deal with Solaris recv that returns ENOENT --- 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);