From: Adam Dickmeiss Date: Fri, 19 Jan 2007 10:29:13 +0000 (+0000) Subject: For GFS, display COMSTACK error when cs_bind fails. X-Git-Tag: YAZ.2.1.48~9 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=5a06fa4cb1689807cd4bd8c6858001a2b9861538;p=yaz-moved-to-github.git For GFS, display COMSTACK error when cs_bind fails. --- diff --git a/src/statserv.c b/src/statserv.c index 5c29e32..7f23e16 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -5,7 +5,7 @@ * NT threaded server code by * Chas Woodfield, Fretwell Downing Informatics. * - * $Id: statserv.c,v 1.46 2007-01-03 08:42:15 adam Exp $ + * $Id: statserv.c,v 1.47 2007-01-19 10:29:13 adam Exp $ */ /** @@ -1111,7 +1111,11 @@ static int add_listener(char *where, int listen_id) if (cs_bind(l, ap, CS_SERVER) < 0) { - yaz_log(YLOG_FATAL|YLOG_ERRNO, "Failed to bind to %s", where); + if (cs_errno(l) == CSYSERR) + yaz_log(YLOG_FATAL|YLOG_ERRNO, "Failed to bind to %s", where); + else + yaz_log(YLOG_FATAL, "Failed to bind to %s: %s", where, + cs_strerror(l)); cs_close (l); return -1; }