/*
- * Copyright (c) 1995-2003, Index Data.
+ * Copyright (c) 1995-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.57 2003-03-24 22:26:51 adam Exp $
+ * $Id: ztest.c,v 1.62 2004-01-27 21:22:44 adam Exp $
*/
/*
rr->errcode = 23;
return 0;
}
+#if NMEM_DEBUG
+ /* if database is stop, stop this process.. For debugging only. */
+ if (!yaz_matchstr (rr->basenames[0], "stop"))
+ {
+ nmem_print_list_l(LOG_LOG);
+ exit(0);
+ }
+#endif
+ /* Throw Database unavailable if other than Default */
if (yaz_matchstr (rr->basenames[0], "Default"))
{
rr->errcode = 109;
}
}
}
+ else if (rr->esr->taskSpecificParameters->which == Z_External_update0)
+ {
+ yaz_log(LOG_LOG, "Received DB Update (version 0)");
+ }
else
{
yaz_log (LOG_WARN, "Unknown Extended Service(%d)",
int ztest_fetch(void *handle, bend_fetch_rr *r)
{
char *cp;
- r->errstring = 0;
+
r->last_in_set = 0;
r->basename = "Default";
r->output_format = r->request_format;
static int ztest_explain(void *handle, bend_explain_rr *rr)
{
- rr->explain_buf = "<explain>\n"
- "\t<serverInfo>\n"
- "\t\t<host>localhost</host>\n"
- "\t\t<port>210</port>\n"
- "\t</serverInfo>\n"
- "</explain>\n";
+ if (rr->database && !strcmp(rr->database, "Default"))
+ {
+ rr->explain_buf = "<explain>\n"
+ "\t<serverInfo>\n"
+ "\t\t<host>localhost</host>\n"
+ "\t\t<port>210</port>\n"
+ "\t</serverInfo>\n"
+ "</explain>\n";
+ }
return 0;
}