X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fstatserv.c;h=720ec08f21fc510383ba258bb79812b74e19415f;hp=a0392513abaf51ef97704da821ecdb9808b0da97;hb=3e11596504862f376b7340848715d6f549864660;hpb=dceeaf843f3bd4c87d667ed62fd4b5446d934cff diff --git a/src/statserv.c b/src/statserv.c index a039251..720ec08 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ @@ -214,7 +214,7 @@ static char *nmem_dup_xml_content(NMEM n, xmlNodePtr ptr) #endif #if YAZ_HAVE_XML2 -static struct gfs_server * gfs_server_new(void) +static struct gfs_server * gfs_server_new(const char *id) { struct gfs_server *n = (struct gfs_server *) nmem_malloc(gfs_nmem, sizeof(*n)); @@ -228,6 +228,7 @@ static struct gfs_server * gfs_server_new(void) n->directory = 0; n->docpath = 0; n->stylesheet = 0; + n->id = nmem_strdup_null(gfs_nmem, id); n->retrieval = yaz_retrieval_create(); return n; } @@ -386,7 +387,7 @@ static void xml_config_read(void) else yaz_log(YLOG_WARN, "Unknown attribute '%s' for server", attr->name); - gfs = *gfsp = gfs_server_new(); + gfs = *gfsp = gfs_server_new(id); gfs->server_node_ptr = ptr_server; if (listenref) { @@ -1401,7 +1402,7 @@ int check_options(int argc, char **argv) fprintf(stderr, "Usage: %s [ -a -v " " -l -u -c -t " " -k -d -p -C certfile" - " -ziDST1 -m -w ... ]\n", me); + " -zKiDST1 -m -w ... ]\n", me); return 1; } }