return clients;
}
-int clients_count(void)
+int clients_get_count(void)
{
return client_use(0);
}
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)
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);
connection_continue(co);
return 1;
}
- else
- {
- yaz_log(YLOG_LOG, "cl=%s. OK no more in total set", client_get_id(cl));
- }
return 0;
}
}
else if (!rc_prep_connection)
{
- session_log(se, YLOG_LOG, "%s: postponing search: No connection",
- client_get_id(cl));
- client_set_state_nb(cl, Client_Working);
+ client_set_diagnostic(cl, 2,
+ ZOOM_diag_str(2),
+ "Cannot create connection");
+ client_set_state_nb(cl, Client_Error);
return -1;
}
co = client_get_connection(cl);
client_set_connection(cl, 0);
}
+void client_mark_dead(struct client *cl)
+{
+ if (cl->connection)
+ connection_mark_dead(cl->connection);
+}
+
void client_stop(struct client *cl)
{
client_lock(cl);