X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ztest%2Fztest.c;h=a92a33539280f52343513775433b74801dee267a;hb=83ac63cea12d7b176008739ac5fdafd01f628bef;hp=c7e0679a4eb1b2daf8a27a69be1c6d88df36a4d5;hpb=6bffc65936ba634077acb9f42ace217bc4737539;p=yaz-moved-to-github.git diff --git a/ztest/ztest.c b/ztest/ztest.c index c7e0679..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.57 2003-03-24 22:26:51 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; @@ -386,6 +393,10 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr) } } } + 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)", @@ -598,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; }