From 044e617fc468bfce45f39e66fe8d34b99654eba2 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 2 Oct 2013 14:02:23 +0200 Subject: [PATCH] Proper diagnostics for unsupp operation YAZ-696 --- src/seshigh.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/seshigh.c b/src/seshigh.c index d357095..c744808 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -1260,8 +1260,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; @@ -1487,8 +1488,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; -- 1.7.10.4