X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=server%2Fstatserv.c;h=5a71da07a36febfc150e860a72fdcbbe95635dc8;hb=7d414d938ccbd98fc71383c356fec70ae269b2f5;hp=dd3dc75ed654ade7bc2f054d1bc30c7c213ed261;hpb=c620a713f1418315efcd4e6fab225e036775d365;p=yaz-moved-to-github.git diff --git a/server/statserv.c b/server/statserv.c index dd3dc75..5a71da0 100644 --- a/server/statserv.c +++ b/server/statserv.c @@ -6,7 +6,7 @@ * NT threaded server code by * Chas Woodfield, Fretwell Downing Informatics. * - * $Id: statserv.c,v 1.91 2003-02-12 15:06:43 adam Exp $ + * $Id: statserv.c,v 1.94 2003-02-18 21:27:53 adam Exp $ */ #include @@ -58,7 +58,7 @@ statserv_options_block control_block = { "", /* diagnostic output to stderr */ "tcp:@:9999", /* default listener port */ PROTO_Z3950, /* default application protocol */ - 60, /* idle timeout (minutes) */ + 15, /* idle timeout (minutes) */ 1024*1024, /* maximum PDU size (approx.) to allow */ "default-config", /* configuration name to pass to backend */ "", /* set user id */ @@ -305,7 +305,7 @@ static void listener(IOCHAN h, int event) yaz_log(LOG_DEBUG, "Setting timeout %d", control_block.idle_timeout); iochan_setdata(new_chan, newas); - iochan_settimeout(new_chan, control_block.idle_timeout * 60); + iochan_settimeout(new_chan, 60); /* Now what we need todo is create a new thread with this iochan as the parameter */ @@ -565,7 +565,7 @@ static void *new_session (void *vp) newas->cs_get_mask = cs_get_mask; iochan_setdata(new_chan, newas); - iochan_settimeout(new_chan, control_block.idle_timeout * 60); + iochan_settimeout(new_chan, 60); a = cs_addrstr(new_line); yaz_log(LOG_LOG, "Starting session %d from %s", no_sessions, a ? a : "[Unknown]"); @@ -598,7 +598,7 @@ static void inetd_connection(int what) if ((assoc = create_association(chan, line))) { iochan_setdata(chan, assoc); - iochan_settimeout(chan, control_block.idle_timeout * 60); + iochan_settimeout(chan, 60); addr = cs_addrstr(line); yaz_log(LOG_LOG, "Inetd association from %s", addr ? addr : "[UNKNOWN]"); @@ -695,7 +695,8 @@ void statserv_setcontrol(statserv_options_block *block) void statserv_add_soap_handler(int (*h)(struct bend_soap_rr *rr), const char *ns) { - struct bend_soap_handler *sh = xmalloc(sizeof(*sh)); + struct bend_soap_handler *sh = (struct bend_soap_handler *) + xmalloc(sizeof(*sh)); sh->handler = h; sh->ns = xstrdup(ns);