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,
}
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;
const char *spec)
{
normalize_record_t nt;
- nt = normalize_record_create(service, spec);
+ nt = normalize_record_create(conf, spec);
if (nt)
{
ci = nmem_malloc(nc->nmem, sizeof(*ci));
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,
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);
const char *spec);
void normalize_cache_destroy(normalize_cache_t nc);
-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();
const char *spec)
{
NMEM nmem = nmem_create();
nmem_strsplit(nt->nmem, ",", spec, &stylesheets, &num);
for (i = 0; i < num; i++)
{
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;
*m = nmem_malloc(nt->nmem, sizeof(**m));
(*m)->marcmap = NULL;
#define NORMALIZE_RECORD_H
typedef struct normalize_record_s *normalize_record_t;
#define NORMALIZE_RECORD_H
typedef struct normalize_record_s *normalize_record_t;
-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);
const char *spec);
void normalize_record_destroy(normalize_record_t nt);
-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);
WRBUF w = wrbuf_alloc();
conf_dir_path(config, w, fname);
void config_stop_listeners(struct conf_config *conf);
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);
}
}
sdb->map = normalize_cache_get(se->normalize_cache,
}
}
sdb->map = normalize_cache_get(se->normalize_cache,
+ se->service->server->config, s);
if (!sdb->map)
return -1;
}
if (!sdb->map)
return -1;
}