X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fstatserv.c;h=8dbcefb1388282510fad636ea0a044b20240a040;hb=d6b502441f8d9b4b169e4f9bb28468d8f2dec627;hp=f84c34517e4eebbc1d8cfad9787c43c39e8d1bef;hpb=e7377c90323e05943dcf318c172a5728605fd9b5;p=yaz-moved-to-github.git diff --git a/src/statserv.c b/src/statserv.c index f84c345..8dbcefb 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -96,7 +96,6 @@ statserv_options_block control_block = { 0, /* one shot (single session) */ "", /* no PDUs */ "", /* diagnostic output to stderr */ - "tcp:@:9999", /* default listener port */ PROTO_Z3950, /* default application protocol */ 900, /* idle timeout (seconds) */ 64*1024*1024, /* maximum PDU size (approx.) to allow */ @@ -117,7 +116,6 @@ statserv_options_block control_block = { "", /* NT Service Dependencies */ "Z39.50 Server", /* NT Service Display Name */ #endif /* WIN32 */ - 0, /* SOAP handlers */ "", /* PID fname */ 0, /* background daemon */ "", /* SSL certificate filename */ @@ -1253,8 +1251,8 @@ static int statserv_sc_main(yaz_sc_t s, int argc, char **argv) { xml_config_add_listeners(); - if (!pListener && *control_block.default_listen) - add_listener(control_block.default_listen, 0); + if (!pListener) + add_listener("tcp:@:9999", 0); #ifndef WIN32 if (control_block.dynamic) @@ -1279,8 +1277,8 @@ static int statserv_sc_main(yaz_sc_t s, int argc, char **argv) static void option_copy(char *dst, const char *src) { - strncpy(dst, src ? src : "", 127); - dst[127] = '\0'; + strncpy(dst, src ? src : "", BEND_NAME_MAX-1); + dst[BEND_NAME_MAX-1] = '\0'; } int check_options(int argc, char **argv)