From: Adam Dickmeiss Date: Mon, 16 Jan 2012 15:16:05 +0000 (+0100) Subject: client_start_search: fixes for state X-Git-Tag: v1.6.8~7 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=00b5d443fda1c15e043993799eb14044ed807e43;p=pazpar2-moved-to-github.git client_start_search: fixes for state client state is un-modified if a search is not sent; this is because previous search may still be in progress and we don't want to prematurely terminate that. --- diff --git a/src/client.c b/src/client.c index 98c69bb..5ca81fe 100644 --- a/src/client.c +++ b/src/client.c @@ -769,7 +769,6 @@ void client_start_search(struct client *cl) yaz_log(YLOG_LOG, "Target %s has preferred status: %d", client_get_id(cl), cl->preferred); } - client_set_state(cl, Client_Working); if (*opt_piggyback) ZOOM_connection_option_set(link, "piggyback", opt_piggyback); @@ -850,11 +849,11 @@ void client_start_search(struct client *cl) if (se->sorted_results->next) { ZOOM_query_destroy(q); - client_set_state_nb(cl, Client_Idle); return; } } } + client_set_state(cl, Client_Working); cl->hits = 0; cl->record_offset = 0; rs = ZOOM_connection_search(link, q);