From 84be3c9eb6775a6c9477e4bfaf462076b0653ec1 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 10 Jun 2010 22:36:08 +0200 Subject: [PATCH] GFS: timeout may be given in seconds (suffix s) --- src/seshigh.c | 2 +- src/statserv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/seshigh.c b/src/seshigh.c index 2d02542..26f250c 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2158,7 +2158,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) yaz_log(log_requestdetail, "Config: %s", cb->configname); - iochan_settimeout(assoc->client_chan, cb->idle_timeout * 60); + iochan_settimeout(assoc->client_chan, cb->idle_timeout); /* we have a backend control block, so call that init function */ if (!(binitres = (*cb->bend_init)(assoc->init))) diff --git a/src/statserv.c b/src/statserv.c index dacdc39..f63dc2d 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -1443,7 +1443,7 @@ int check_options(int argc, char **argv) fprintf(stderr, "%s: Specify positive timeout for -t.\n", me); return(1); } - control_block.idle_timeout = r; + control_block.idle_timeout = strchr(arg, 's') ? r : 60 * r; break; case 'k': if (!arg || !(r = atoi(arg))) -- 1.7.10.4