X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=server%2Fstatserv.c;h=b4d67d6d010098815a4fcaa6e53997764af2e224;hp=b97eb39e2b28bbaf907ad81d3f0e421c23700ff9;hb=d32b1dbdc1f0392883547cc9e56c26f384a4c57f;hpb=87a9bdcb0fda85461f9992519f4239645c8b2826 diff --git a/server/statserv.c b/server/statserv.c index b97eb39..b4d67d6 100644 --- a/server/statserv.c +++ b/server/statserv.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: statserv.c,v $ - * Revision 1.15 1995-03-31 10:16:51 quinn + * Revision 1.16 1995-04-10 10:23:40 quinn + * Some work to add scan and other things. + * + * Revision 1.15 1995/03/31 10:16:51 quinn * Fixed logging. * * Revision 1.14 1995/03/31 09:18:58 quinn @@ -78,8 +81,9 @@ #include static char *me = "statserver"; -static int dynamic = 1; /* fork on incoming connection */ +int dynamic = 1; /* fork on incoming connection */ static int loglevel = LOG_DEFAULT_LEVEL; +char *apdufile = 0; #define DEFAULT_LISTENER "tcp:localhost:9999" @@ -284,7 +288,7 @@ int statserv_main(int argc, char **argv) char *logfile = 0; me = argv[0]; - while ((ret = options("szSl:v:", argv, argc, &arg)) != -2) + while ((ret = options("a:szSl:v:", argv, argc, &arg)) != -2) switch (ret) { case 0: @@ -295,13 +299,15 @@ int statserv_main(int argc, char **argv) case 's': protocol = CS_SR; break; case 'S': dynamic = 0; break; case 'l': - logfile = arg; - log_init(loglevel, me, logfile); - break; + logfile = arg; + log_init(loglevel, me, logfile); + break; case 'v': - loglevel = log_mask_str(arg); - log_init(loglevel, me, logfile); - break; + loglevel = log_mask_str(arg); + log_init(loglevel, me, logfile); + break; + case 'a': + apdufile = arg; break; default: fprintf(stderr, "Usage: %s [ -v -l -zsS ... ]\n", me); exit(1); @@ -311,5 +317,6 @@ int statserv_main(int argc, char **argv) if (!listeners) add_listener(DEFAULT_LISTENER, protocol); logf(LOG_LOG, "Entering event loop."); + return event_loop(); }