Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 14 Jun 2010 10:37:00 +0000 (12:37 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 14 Jun 2010 10:37:00 +0000 (12:37 +0200)
src/seshigh.c
src/statserv.c

index aaf0618..823fc2b 100644 (file)
@@ -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)))
index dacdc39..db60db7 100644 (file)
@@ -95,7 +95,7 @@ statserv_options_block control_block = {
     "",                         /* diagnostic output to stderr */
     "tcp:@:9999",               /* default listener port */
     PROTO_Z3950,                /* default application protocol */
-    15,                         /* idle timeout (minutes) */
+    900,                        /* idle timeout (seconds) */
     1024*1024,                  /* maximum PDU size (approx.) to allow */
     "default-config",           /* configuration name to pass to backend */
     "",                         /* set user id */
@@ -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)))