X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Fhttp_command.c;h=8ba4b15697e7ad33f69cd0acdbf1f94694d7e786;hb=950f9ae98a1342eba4845091cc65bdfc45dd275b;hp=e48d7f743e3a599de561222d7a88b2a59d5340b4;hpb=653c470513471b8b3ee75310272399b6bf22dad6;p=pazpar2-moved-to-github.git diff --git a/src/http_command.c b/src/http_command.c index e48d7f7..8ba4b15 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -229,7 +229,7 @@ static const char *get_msg(enum pazpar2_error_code code) { PAZPAR2_RECORD_FAIL, "Record command failed"}, { PAZPAR2_NOT_IMPLEMENTED, "Not implemented"}, { PAZPAR2_NO_SERVICE, "No service"}, - { PAZPAR2_ALREADY_BLOCKED, "Already blocked on command in session."}, + { PAZPAR2_ALREADY_BLOCKED, "Already blocked in session on: "}, { PAZPAR2_LAST_ERROR, "Last error"}, { 0, 0 } }; @@ -610,7 +610,8 @@ static void bytarget_response(struct http_channel *c) { ht = get_hitsbytarget(s->psession, &count, c->nmem); response_open(c, "bytarget"); - + if (count == 0) + yaz_log(YLOG_WARN, "Empty bytarget Response. No targets found!"); for (i = 0; i < count; i++) { wrbuf_puts(c->wrbuf, "\n"); @@ -674,6 +675,7 @@ static void cmd_bytarget(struct http_channel *c) if (session_set_watch(s->psession, SESSION_WATCH_BYTARGET, bytarget_result_ready, c, c) != 0) { + yaz_log(YLOG_WARN, "Attempt to block multiple times on bytarget block. Not supported!"); error(rs, PAZPAR2_ALREADY_BLOCKED, "bytarget"); } else @@ -1024,6 +1026,7 @@ static void cmd_show(struct http_channel *c) } else { + yaz_log(YLOG_WARN, "Attempt to block multiple times on show (preferred targets) block. Not supported!"); error(rs, PAZPAR2_ALREADY_BLOCKED, "show (preferred targets)"); } release_session(c, s); @@ -1036,6 +1039,7 @@ static void cmd_show(struct http_channel *c) if (session_set_watch(s->psession, SESSION_WATCH_SHOW, show_records_ready, c, c) != 0) { + yaz_log(YLOG_WARN, "Attempt to block multiple times on show block. Not supported!"); error(rs, PAZPAR2_ALREADY_BLOCKED, "show"); } else