From: Dennis Schafroth Date: Fri, 15 Jul 2011 13:58:53 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2 X-Git-Tag: v1.5.7~20 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=d30758a85b647a03a1ff4d83ce4fe41b1d219167;hp=-c;p=pazpar2-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2 reset .cproject Conflicts: .cproject --- d30758a85b647a03a1ff4d83ce4fe41b1d219167 diff --combined .cproject index 6ab0e6b,0b82bfa..be8b449 --- a/.cproject +++ b/.cproject @@@ -2,788 -2,215 +2,604 @@@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ++ ++ + + + + + diff --combined src/pazpar2_config.c index d8d9569,ccd7be4..b4c0dc5 --- a/src/pazpar2_config.c +++ b/src/pazpar2_config.c @@@ -60,9 -60,6 +60,6 @@@ struct conf_confi static char *parse_settings(struct conf_config *config, NMEM nmem, xmlNode *node); - static struct conf_targetprofiles *parse_targetprofiles(NMEM nmem, - xmlNode *node); - static void conf_metadata_assign(NMEM nmem, struct conf_metadata * metadata, const char *name, @@@ -122,7 -119,6 +119,6 @@@ static struct conf_service *service_ini service->next = 0; service->settings = 0; service->databases = 0; - service->targetprofiles = 0; service->server = server; service->session_timeout = 60; /* default session timeout */ service->z3950_session_timeout = 180; @@@ -515,17 -511,6 +511,6 @@@ static struct conf_service *service_cre } else if (!strcmp((const char *) n->name, "settings")) got_settings++; - else if (!strcmp((const char *) n->name, (const char *) "targetprofiles")) - { - if (service->targetprofiles) - { - yaz_log(YLOG_FATAL, "Can't repeat targetprofiles"); - return 0; - } - if (!(service->targetprofiles = - parse_targetprofiles(service->nmem, n))) - return 0; - } else if (!strcmp((const char *) n->name, "relevance")) { if (service->relevance_pct) @@@ -570,15 -555,15 +555,15 @@@ } else if (!strcmp((const char *) n->name, "facet")) { - if (service->mergekey_pct) + if (service->facet_pct) { - yaz_log(YLOG_LOG, "facety may not repeat in service"); + yaz_log(YLOG_LOG, "facet may not repeat in service"); return 0; } else { service->facet_pct = pp2_charset_create_xml(n); - if (!service->mergekey_pct) + if (!service->facet_pct) return 0; } } @@@ -882,43 -867,6 +867,6 @@@ WRBUF conf_get_fname(struct conf_confi return w; } - static struct conf_targetprofiles *parse_targetprofiles(NMEM nmem, - xmlNode *node) - { - struct conf_targetprofiles *r = nmem_malloc(nmem, sizeof(*r)); - xmlChar *type = xmlGetProp(node, (xmlChar *) "type"); - xmlChar *src = xmlGetProp(node, (xmlChar *) "src"); - - memset(r, 0, sizeof(*r)); - - if (type) - { - if (!strcmp((const char *) type, "local")) - r->type = Targetprofiles_local; - else - { - yaz_log(YLOG_FATAL, "Unknown targetprofile type"); - return 0; - } - } - else - { - yaz_log(YLOG_FATAL, "Must specify type for targetprofile"); - return 0; - } - - if (src) - r->src = nmem_strdup(nmem, (const char *) src); - else - { - yaz_log(YLOG_FATAL, "Must specify src in targetprofile"); - return 0; - } - xmlFree(type); - xmlFree(src); - return r; - } - struct conf_service *locate_service(struct conf_server *server, const char *service_id) {