* Copyright (c) 1995-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.58 2003-09-02 12:12:13 adam Exp $
+ * $Id: ztest.c,v 1.60 2004-01-15 10:04:39 adam Exp $
*/
/*
rr->errcode = 23;
return 0;
}
+ /* 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);
+ }
+ /* Throw Database unavailable if other than Default */
if (yaz_matchstr (rr->basenames[0], "Default"))
{
rr->errcode = 109;
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;
}