X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fsession.c;h=cafbc9d54351f146aa0ef4fc77b04a3c96fd4433;hb=cf96019e267e6d2e2a240d7e5789fae849dcfaec;hp=0817d8e38287211078d9b20f692f63d8df2a8793;hpb=3d72c16632e288e4a6635152083b7cb930707428;p=pazpar2-moved-to-github.git diff --git a/src/session.c b/src/session.c index 0817d8e..cafbc9d 100644 --- a/src/session.c +++ b/src/session.c @@ -653,7 +653,7 @@ static void session_sort_unlocked(struct session *se, struct reclist_sortparms * int type = sp->type; int clients_research = 0; - yaz_log(YLOG_LOG, "session_sort field=%s increasing=%d type=%d", field, increasing, type); + yaz_log(YLOG_DEBUG, "session_sort field=%s increasing=%d type=%d", field, increasing, type); /* see if we already have sorted for this criteria */ for (sr = se->sorted_results; sr; sr = sr->next) { @@ -1229,6 +1229,38 @@ void show_single_stop(struct session *se, struct record_cluster *rec) } +int session_fetch_more(struct session *se) +{ + struct client_list *l; + int ret = 0; + + for (l = se->clients_active; l; l = l->next) + { + struct client *cl = l->client; + if (client_get_state(cl) == Client_Idle) + { + if (client_fetch_more(cl)) + { + session_log(se, YLOG_LOG, "%s: more to fetch", + client_get_id(cl)); + ret = 1; + } + else + { + session_log(se, YLOG_LOG, "%s: no more to fetch", + client_get_id(cl)); + } + } + else + { + session_log(se, YLOG_LOG, "%s: no fetch due to state=%s", + client_get_id(cl), client_get_state_str(cl)); + } + + } + return ret; +} + struct record_cluster **show_range_start(struct session *se, struct reclist_sortparms *sp, int start, int *num, int *total, @@ -1843,7 +1875,7 @@ static int ingest_to_cluster(struct client *cl, cluster = reclist_insert(se->reclist, service, record, mergekey_norm, &se->total_merged); if (!cluster) - return -1; + return 0; // complete match with existing record { const char *use_term_factor_str =