return cl->record_offset;
}
+void client_set_diagnostic(struct client *cl, int diagnostic)
+{
+ cl->diagnostic = diagnostic;
+}
+
int client_get_diagnostic(struct client *cl)
{
return cl->diagnostic;
int client_get_hits(struct client *cl);
int client_get_num_records(struct client *cl);
int client_get_diagnostic(struct client *cl);
+void client_set_diagnostic(struct client *cl, int diagnostic);
void client_set_database(struct client *cl, struct session_database *db);
struct host *client_get_host(struct client *cl);
const char *client_get_url(struct client *cl);
case ZOOM_EVENT_END:
{
const char *error, *addinfo;
- if (ZOOM_connection_error(link, &error, &addinfo))
+ int err;
+ if ((err = ZOOM_connection_error(link, &error, &addinfo)))
{
yaz_log(YLOG_LOG, "Error %s from %s",
error, client_get_url(cl));
}
iochan_settimeout(iochan, co->session_timeout);
+ client_set_diagnostic(cl, err);
client_set_state(cl, Client_Idle);
}
break;