* 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.48 2007-05-02 11:53:25 adam Exp $
*/
/**
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 */
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;
}