From e78a02092641952d74a56396c6d281b225888cd1 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 17 Jan 2012 12:18:44 +0100 Subject: [PATCH] Sort: more strict re-searching Only search+sort for working, idle clients. --- src/session.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/session.c b/src/session.c index 78aad61..3e00cc1 100644 --- a/src/session.c +++ b/src/session.c @@ -648,12 +648,9 @@ void session_sort(struct session *se, const char *field, int increasing) for (l = se->clients_active; l; l = l->next) { struct client *cl = l->client; - struct timeval tval; - int ret = client_prep_connection(cl, se->service->z3950_operation_timeout, - se->service->z3950_session_timeout, - se->service->server->iochan_man, - &tval, 1); - if (ret) + if (client_get_state(cl) == Client_Connecting || + client_get_state(cl) == Client_Idle || + client_get_state(cl) == Client_Working) client_start_search(cl); } session_leave(se); -- 1.7.10.4