-/* $Id: zebrasrv.c,v 1.21 2007-10-29 09:25:41 adam Exp $
- Copyright (C) 1995-2007
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ Copyright (C) 1994-2011 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
se->subqueryId = term_ref_id ?
odr_strdup(r->stream, term_ref_id) : 0;
- se->fullQuery = odr_intdup(r->stream, 0);
+ se->fullQuery = odr_booldup(r->stream, 0);
se->subqueryExpression =
odr_malloc(r->stream, sizeof(Z_QueryExpression));
se->subqueryExpression->which =
{
ZebraHandle zh = (ZebraHandle) handle;
- yaz_log(YLOG_LOG, "function: %d", *rr->esr->function);
+ yaz_log(YLOG_LOG, "function: " ODR_INT_PRINTF, *rr->esr->function);
if (rr->esr->packageName)
yaz_log(YLOG_LOG, "packagename: %s", rr->esr->packageName);
- yaz_log(YLOG_LOG, "Waitaction: %d", *rr->esr->waitAction);
+ yaz_log(YLOG_LOG, "Waitaction: " ODR_INT_PRINTF, *rr->esr->waitAction);
if (!rr->esr->taskSpecificParameters)
{
yaz_log(YLOG_LOG, "start");
break;
default:
- yaz_log(YLOG_LOG, " unknown (%d)", *toKeep->action);
+ yaz_log(YLOG_LOG, " unknown (" ODR_INT_PRINTF ")",
+ *toKeep->action);
}
}
if (toKeep->databaseName)
char pidstr[30];
sprintf(pidstr, "%ld", (long) getpid());
- write(fd, pidstr, strlen(pidstr));
+ if (write(fd, pidstr, strlen(pidstr)) != strlen(pidstr))
+ {
+ yaz_log(YLOG_ERRNO|YLOG_FATAL, "write fail %s", pidfname);
+ exit(1);
+ }
}
}
#endif
sob->bend_start = bend_start;
sob->bend_stop = bend_stop;
#ifdef WIN32
+ strcpy(sob->service_name, "zebrasrv");
strcpy(sob->service_display_name, "Zebra Server");
#endif
statserv_setcontrol(sob);
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab