-/* $Id: zserver.c,v 1.91 2002-08-05 14:08:08 adam Exp $
+/* $Id: zserver.c,v 1.97 2002-09-13 11:40:35 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
sob = statserv_getcontrol ();
if (!(zh = zebra_open (sob->handle)))
{
- yaz_log (LOG_FATAL, "Failed to open config `%s'", sob->configname);
+ yaz_log (LOG_WARN, "Failed to read config `%s'", sob->configname);
r->errcode = 1;
return r;
}
switch (type)
{
case Z_Term_characterString:
- yaz_log (LOG_LOG, "term as characterString");
+ yaz_log (LOG_DEBUG, "term as characterString");
term->which = Z_Term_characterString;
term->u.characterString = odr_strdup (r->stream, outbuf);
break;
case Z_Term_general:
- yaz_log (LOG_LOG, "term as general");
+ yaz_log (LOG_DEBUG, "term as general");
term->which = Z_Term_general;
term->u.general = odr_malloc (r->stream, sizeof(*term->u.general));
term->u.general->size = term->u.general->len = len;
yaz_log(LOG_LOG, "adm-drop");
break;
case Z_ESAdminOriginPartToKeep_create:
- yaz_log(LOG_LOG, "adm-create");
+ yaz_log(LOG_LOG, "adm-create %s", r->toKeep->databaseName);
zebra_admin_create (zh, r->toKeep->databaseName);
break;
case Z_ESAdminOriginPartToKeep_import:
if (sob->handle)
zebra_stop((ZebraService) sob->handle);
sob->handle = zebra_start(sob->configname);
+ if (!sob->handle)
+ {
+ yaz_log (LOG_FATAL, "Failed to read config `%s'", sob->configname);
+ exit (1);
+ }
}
static void bend_stop(struct statserv_options_block *sob)
strcpy (sob->configname, "zebra.cfg");
sob->bend_start = bend_start;
sob->bend_stop = bend_stop;
-
+#ifdef WIN32
+ strcpy (sob->service_display_name, "Zebra Server");
+#endif
statserv_setcontrol (sob);
return statserv_main (argc, argv, bend_init, bend_close);