From: Adam Dickmeiss Date: Thu, 10 Nov 2011 10:13:20 +0000 (+0100) Subject: Reset hits, record_offset later in client_start_search X-Git-Tag: v1.6.6~40 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=af6b4df01cb04cb343b9e9ff4926db1e02f1d0d0;p=pazpar2-moved-to-github.git Reset hits, record_offset later in client_start_search Because the search may not be executed anyway - if search is already done and no native sorting is available. --- diff --git a/src/client.c b/src/client.c index 4fe301f..5100f80 100644 --- a/src/client.c +++ b/src/client.c @@ -749,8 +749,6 @@ void client_start_search(struct client *cl) assert(link); - cl->hits = 0; - cl->record_offset = 0; cl->diagnostic = 0; if (extra_args && *extra_args) @@ -848,6 +846,8 @@ void client_start_search(struct client *cl) } } } + cl->hits = 0; + cl->record_offset = 0; rs = ZOOM_connection_search(link, q); ZOOM_query_destroy(q); ZOOM_resultset_destroy(cl->resultset);