X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fstatserv.c;h=83dd4220dc7eb6a9e9bb70ae65c9daf07e854da2;hb=20f83e699d4868d263393996bd4b98fee045e360;hp=4a8bad6769c89be7d2caf542b618005a5e92fb04;hpb=ba1eb985bfd53a8cfbfd251e65688921dba56236;p=yaz-moved-to-github.git diff --git a/src/statserv.c b/src/statserv.c index 4a8bad6..83dd422 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -1,11 +1,11 @@ /* - * Copyright (C) 1995-2006, Index Data ApS + * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * * NT threaded server code by * Chas Woodfield, Fretwell Downing Informatics. * - * $Id: statserv.c,v 1.45 2006-10-09 11:21:37 adam Exp $ + * $Id: statserv.c,v 1.48 2007-05-02 11:53:25 adam Exp $ */ /** @@ -92,7 +92,6 @@ statserv_options_block control_block = { 1, /* dynamic mode */ 0, /* threaded mode */ 0, /* one shot (single session) */ - 0, /* __UNUSED_loglevel */ "", /* no PDUs */ "", /* diagnostic output to stderr */ "tcp:@:9999", /* default listener port */ @@ -1111,7 +1110,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; }