-## $Id: Makefile.am,v 1.59 2006-11-21 14:32:38 adam Exp $
+## $Id: Makefile.am,v 1.60 2006-12-05 09:26:37 adam Exp $
aux_libs = \
../rset/libidzebra-rset.la \
AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) \
-DDEFAULT_PROFILE_PATH=\"$(pkgdatadir)/tab\" \
+ -DDEFAULT_MODULE_PATH=\"$(modlibdir)\" \
$(TCL_INCLUDE)
LDADD = $(zebralib) $(YAZLALIB)
-/* $Id: zebraapi.c,v 1.235 2006-11-27 09:17:01 adam Exp $
+/* $Id: zebraapi.c,v 1.236 2006-12-05 09:26:37 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
return zh;
}
-ZebraService zebra_start (const char *configName)
+ZebraService zebra_start(const char *configName)
{
return zebra_start_res(configName, 0, 0);
}
-ZebraService zebra_start_res (const char *configName, Res def_res, Res over_res)
+ZebraService zebra_start_res(const char *configName, Res def_res, Res over_res)
{
Res res;
}
getcwd(cwd, sizeof(cwd)-1);
- profilePath = res_get_def(res, "profilePath", DEFAULT_PROFILE_PATH);
- yaz_log(YLOG_DEBUG, "profilePath=%s cwd=%s", profilePath, cwd);
+ profilePath = res_get_def(res, "profilePath", 0);
data1_set_tabpath (reg->dh, profilePath);
data1_set_tabroot (reg->dh, reg_path);
-/* $Id: zebraidx.c,v 1.1 2006-09-22 10:18:08 adam Exp $
+/* $Id: zebraidx.c,v 1.2 2006-12-05 09:26:37 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
int enable_commit = 1;
char *database = 0;
Res res = res_open(0, 0);
+ Res default_res = res_open(0, 0);
int trans_started=0;
#if HAVE_SYS_TIMES_H
);
exit (1);
}
+ res_set(default_res, "profilePath", DEFAULT_PROFILE_PATH);
+ res_set(default_res, "modulePath", DEFAULT_MODULE_PATH);
while ((ret = options("sVt:c:g:d:m:v:nf:l:L", argv, argc, &arg)) != -2)
{
if (ret == 0)
if (!zs)
{
const char *config = configName ? configName : "zebra.cfg";
- zs = zebra_start_res (config, 0, res);
+ zs = zebra_start_res(config, default_res, res);
if (!zs)
{
yaz_log (YLOG_FATAL, "Cannot read config %s", config);
}
#endif
#endif
+ res_close(res);
+ res_close(default_res);
nmem_exit();
exit (0);
return 0;
-/* $Id: zebrasrv.c,v 1.2 2006-11-21 22:17:49 adam Exp $
+/* $Id: zebrasrv.c,v 1.3 2006-12-05 09:26:37 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
static void bend_start (struct statserv_options_block *sob)
{
+ Res default_res = res_open(0, 0);
+
if (sob->handle)
zebra_stop((ZebraService) sob->handle);
+ res_set(default_res, "profilePath", DEFAULT_PROFILE_PATH);
+ res_set(default_res, "modulePath", DEFAULT_MODULE_PATH);
sob->handle = zebra_start(sob->configname);
+ res_close(default_res);
if (!sob->handle)
{
yaz_log (YLOG_FATAL, "Failed to read config `%s'", sob->configname);