X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fstatserv.c;h=4a469dee50656c7ccf8062cc40037a8cc59620a0;hb=59aa88eb085c71e191802510804588a4f9edbe9b;hp=a0392513abaf51ef97704da821ecdb9808b0da97;hpb=37fbd309fef590f0cc0e3bc955161bcb8e37e99e;p=yaz-moved-to-github.git diff --git a/src/statserv.c b/src/statserv.c index a039251..4a469de 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -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) {