conf_get_fname takes conf_config rather than conf_service as argument.
This function is used by the normalize_record system.
}
normalize_record_t normalize_cache_get(normalize_cache_t nc,
- struct conf_service *service,
+ struct conf_config *conf,
const char *spec)
{
normalize_record_t nt;
nt = ci->nt;
else
{
- nt = normalize_record_create(service, spec);
+ nt = normalize_record_create(conf, spec);
if (nt)
{
ci = nmem_malloc(nc->nmem, sizeof(*ci));
normalize_cache_t normalize_cache_create(void);
normalize_record_t normalize_cache_get(normalize_cache_t nc,
- struct conf_service *service,
+ struct conf_config *conf,
const char *spec);
void normalize_cache_destroy(normalize_cache_t nc);
NMEM nmem;
};
-normalize_record_t normalize_record_create(struct conf_service *service,
+normalize_record_t normalize_record_create(struct conf_config *conf,
const char *spec)
{
NMEM nmem = nmem_create();
nmem_strsplit(nt->nmem, ",", spec, &stylesheets, &num);
for (i = 0; i < num; i++)
{
- WRBUF fname = conf_get_fname(service, stylesheets[i]);
+ WRBUF fname = conf_get_fname(conf, stylesheets[i]);
*m = nmem_malloc(nt->nmem, sizeof(**m));
(*m)->marcmap = NULL;
#define NORMALIZE_RECORD_H
typedef struct normalize_record_s *normalize_record_t;
-struct conf_service;
+struct conf_config;
-normalize_record_t normalize_record_create(struct conf_service *service,
+normalize_record_t normalize_record_create(struct conf_config *conf,
const char *spec);
void normalize_record_destroy(normalize_record_t nt);
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);
void config_stop_listeners(struct conf_config *conf);
-WRBUF conf_get_fname(struct conf_service *service, const char *fname);
+WRBUF conf_get_fname(struct conf_config *config, const char *fname);
#endif
}
}
sdb->map = normalize_cache_get(se->normalize_cache,
- se->service, s);
+ se->service->server->config, s);
if (!sdb->map)
return -1;
}