#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+#ifdef WIN32
+#include <windows.h>
+#endif
#include <signal.h>
#include <ctype.h>
#include <assert.h>
#include <yaz/querytowrbuf.h>
#include <yaz/oid_db.h>
#include <yaz/snprintf.h>
+#include <yaz/gettimeofday.h>
#define USE_TIMING 0
#if USE_TIMING
int no_working = 0;
int no_failed = 0;
struct client_list *l;
- struct timespec abstime;
struct timeval tval;
yaz_log(YLOG_DEBUG, "Search");
}
se->reclist = reclist_create(se->nmem);
- gettimeofday(&tval, 0);
+ yaz_gettimeofday(&tval);
- abstime.tv_sec = tval.tv_sec + 5;
- abstime.tv_nsec = tval.tv_usec * 1000;
+ tval.tv_sec += 5;
for (l = se->clients; l; l = l->next)
{
if (client_prep_connection(cl, se->service->z3950_operation_timeout,
se->service->z3950_session_timeout,
se->service->server->iochan_man,
- &abstime))
+ &tval))
client_start_search(cl);
}
}
if (!strcmp((const char *) n->name, "metadata"))
{
xmlChar *type = xmlGetProp(n, (xmlChar *) "type");
- if (!strcmp(name, (const char *) type))
+ if (type == NULL) {
+ yaz_log(YLOG_FATAL, "Missing type attribute on metadata element. Skipping!");
+ }
+ else if (!strcmp(name, (const char *) type))
{
xmlChar *value = xmlNodeListGetString(doc, n->children, 1);
if (value)
\param cl client holds the result set for record
\param rec record buffer (0 terminated)
\param record_no record position (1, 2, ..)
+ \param nmem working NMEM
\retval 0 OK
\retval -1 failure
*/