X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fpazpar2_config.c;h=ec87cafff457601301c9936e3df2a03ba6b1294d;hb=5775b27098fab0dac8ddcbc719a8b35c67391424;hp=2cfba231e3bc40ac9792ba4bb2b3546c08060cb8;hpb=ebf24e785974c368809d73394a24eb80506598fd;p=pazpar2-moved-to-github.git diff --git a/src/pazpar2_config.c b/src/pazpar2_config.c index 2cfba23..ec87caf 100644 --- a/src/pazpar2_config.c +++ b/src/pazpar2_config.c @@ -38,6 +38,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #if HAVE_UNISTD_H #include #endif +#include "ppmutex.h" #include "incref.h" #include "pazpar2_config.h" #include "settings.h" @@ -697,7 +698,7 @@ struct conf_service *service_create(struct conf_server *server, inherit_server_settings(service); resolve_databases(service); assert(service->mutex == 0); - yaz_mutex_create(&service->mutex); + pazpar2_mutex_create(&service->mutex, "conf"); } return service; } @@ -839,9 +840,8 @@ static struct conf_server *server_create(struct conf_config *config, return server; } -WRBUF conf_get_fname(struct conf_service *service, const char *fname) +WRBUF conf_get_fname(struct conf_config *config, const char *fname) { - struct conf_config *config = service->server->config; WRBUF w = wrbuf_alloc(); conf_dir_path(config, w, fname); @@ -1024,12 +1024,15 @@ void config_destroy(struct conf_config *config) if (config) { struct conf_server *server = config->servers; + iochan_man_destroy(&config->iochan_man); while (server) { struct conf_server *s_next = server->next; server_destroy(server); server = s_next; } + database_hosts_destroy(&config->database_hosts); + wrbuf_destroy(config->confdir); nmem_destroy(config->nmem); } @@ -1057,7 +1060,7 @@ void config_process_events(struct conf_config *conf) { resolve_databases(s); assert(s->mutex == 0); - yaz_mutex_create(&s->mutex); + pazpar2_mutex_create(&s->mutex, "service"); } http_mutex_init(ser); }