X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fclient.c;h=fe5bef35db22dafbaa21263c53e8ecf8a82da89e;hb=64dccf5757a22cedd3c21ca834e3e02f39dd0504;hp=75a8e20e089b0d9adef0457a77307565b9a938c8;hpb=4b259026074c2fb5931eac168a64e8df0be46e30;p=pazpar2-moved-to-github.git diff --git a/src/client.c b/src/client.c index 75a8e20..fe5bef3 100644 --- a/src/client.c +++ b/src/client.c @@ -90,7 +90,7 @@ static int client_use(int delta) return clients; } -int clients_count(void) +int clients_get_count(void) { return client_use(0); } @@ -825,6 +825,7 @@ int client_fetch_more(struct client *cl) const char *str; int extend_recs = 0; int number = cl->hits - cl->record_offset; + struct connection *co = client_get_connection(cl); str = session_setting_oneval(sdb, PZ_EXTENDRECS); if (!str || !*str) @@ -840,10 +841,13 @@ int client_fetch_more(struct client *cl) if (number > extend_recs) number = extend_recs; - if (number > 0) + if (number <= 0) + yaz_log(YLOG_LOG, "cl=%s. OK no more in total set", client_get_id(cl)); + else if (!co) + yaz_log(YLOG_LOG, "cl=%s. No connection", client_get_id(cl)); + else { ZOOM_resultset set = cl->resultset; - struct connection *co = client_get_connection(cl); str = session_setting_oneval(sdb, PZ_REQUESTSYNTAX); ZOOM_resultset_option_set(set, "preferredRecordSyntax", str); @@ -856,10 +860,6 @@ int client_fetch_more(struct client *cl) connection_continue(co); return 1; } - else - { - yaz_log(YLOG_LOG, "cl=%s. OK no more in total set", client_get_id(cl)); - } return 0; }