X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebraapi.c;h=7b146618852e3344a3453719636999e9e8d59221;hb=ab97a59cbf609730cbc674885832fd5bb1dc64fb;hp=709e291c696549801c373e084dfbb3381f02acbe;hpb=f064c8e9a0d96ef7a0ab489034c59b21d1c37f84;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index 709e291..7b14661 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.235 2006-11-27 09:17:01 adam Exp $ +/* $Id: zebraapi.c,v 1.237 2006-12-05 14:06:29 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -174,12 +174,12 @@ ZebraHandle zebra_open(ZebraService zs, Res res) 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; @@ -209,7 +209,18 @@ ZebraService zebra_start_res (const char *configName, Res def_res, Res over_res) res_close(res); return 0; } + if (zebra_check_res(res)) + { + yaz_log(YLOG_FATAL, "Configuration error(s) for %s", + configName); + return 0; + } } + else + { + zebra_check_res(res); + } + zh = xmalloc(sizeof(*zh)); zh->global_res = res; zh->sessions = 0; @@ -348,8 +359,7 @@ struct zebra_register *zebra_register_open(ZebraService zs, const char *name, } 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);