From: Adam Dickmeiss Date: Wed, 21 Dec 2011 14:47:36 +0000 (+0100) Subject: Avoid blocking record retrieval X-Git-Tag: v1.6.7~12 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=480e6d6a58875857bda736e9fefa5c12fbccc516;p=pazpar2-moved-to-github.git Avoid blocking record retrieval Use ZOOM_resultset_record_immediate instead of ZOOM_resultset_record. --- diff --git a/src/client.c b/src/client.c index 44d7f57..9a81190 100644 --- a/src/client.c +++ b/src/client.c @@ -237,7 +237,7 @@ static void client_show_immediate( error_handler(data, "no resultset"); return; } - rec = ZOOM_resultset_record(resultset, position-1); + rec = ZOOM_resultset_record_immediate(resultset, position-1); if (!rec) { error_handler(data, "no record"); @@ -580,7 +580,7 @@ static void client_record_ingest(struct client *cl) ZOOM_record rec = 0; ZOOM_resultset resultset = cl->resultset; int offset = cl->record_offset; - if ((rec = ZOOM_resultset_record(resultset, offset))) + if ((rec = ZOOM_resultset_record_immediate(resultset, offset))) { cl->record_offset++; if (cl->session == 0) @@ -639,8 +639,8 @@ void client_record_response(struct client *cl) if (cl->show_raw && cl->show_raw->active) { ZOOM_record rec = 0; - if ((rec = ZOOM_resultset_record(resultset, - cl->show_raw->position-1))) + if ((rec = ZOOM_resultset_record_immediate( + resultset, cl->show_raw->position-1))) { cl->show_raw->active = 0; ingest_raw_record(cl, rec);