From: Adam Dickmeiss Date: Wed, 2 Oct 2013 12:02:23 +0000 (+0200) Subject: Proper diagnostics for unsupp operation YAZ-696 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=5dda5d6f7b7917130c95b10b840e10bc1443215b;p=yaz-moved-to-github.git Proper diagnostics for unsupp operation YAZ-696 --- diff --git a/src/seshigh.c b/src/seshigh.c index 24ade48..c7823c6 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -1254,8 +1254,9 @@ static void srw_bend_explain(association *assoc, { Z_SRW_explainRequest *srw_req = sr->u.explain_request; yaz_log(log_requestdetail, "Got SRW ExplainRequest"); - *http_code = 404; srw_bend_init(assoc, &srw_res->diagnostics, &srw_res->num_diagnostics, sr); + if (!assoc->init && srw_res->num_diagnostics == 0) + *http_code = 404; if (assoc->init) { bend_explain_rr rr; @@ -1499,8 +1500,9 @@ static void srw_bend_update(association *assoc, Z_SRW_updateRequest *srw_req = sr->u.update_request; yaz_log(log_session, "SRWUpdate action=%s", srw_req->operation); yaz_log(YLOG_DEBUG, "num_diag = %d", srw_res->num_diagnostics ); - *http_code = 404; srw_bend_init(assoc, &srw_res->diagnostics, &srw_res->num_diagnostics, sr); + if (!assoc->init && srw_res->num_diagnostics == 0) + *http_code = 404; if (assoc->init) { bend_update_rr rr;