X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ztest%2Fztest.c;h=a92a33539280f52343513775433b74801dee267a;hb=b9c35fd3860882cc3804a4a9d69bec9b96099c57;hp=2574a8c763ff4a9e3409c8dbab9dad94ebececb9;hpb=4b3d1e197d75fcb2607be8d86d244f20c4180000;p=yaz-moved-to-github.git diff --git a/ztest/ztest.c b/ztest/ztest.c index 2574a8c..a92a335 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -2,7 +2,7 @@ * 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 $ */ /* @@ -34,6 +34,13 @@ int ztest_search (void *handle, bend_search_rr *rr) 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; @@ -602,12 +609,15 @@ int ztest_scan(void *handle, bend_scan_rr *q) static int ztest_explain(void *handle, bend_explain_rr *rr) { - rr->explain_buf = "\n" - "\t\n" - "\t\tlocalhost\n" - "\t\t210\n" - "\t\n" - "\n"; + if (rr->database && !strcmp(rr->database, "Default")) + { + rr->explain_buf = "\n" + "\t\n" + "\t\tlocalhost\n" + "\t\t210\n" + "\t\n" + "\n"; + } return 0; }