}
}
-void client_record_response(struct client *cl)
+void client_record_response(struct client *cl, int *got_records)
{
struct connection *co = cl->connection;
ZOOM_connection link = connection_get_link(co);
else
{
client_record_ingest(cl);
+ *got_records = 1;
}
}
}
void client_init_response(struct client *cl, Z_APDU *a);
void client_search_response(struct client *cl);
-void client_record_response(struct client *cl);
+void client_record_response(struct client *cl, int *got_records);
void client_close_response(struct client *cl, Z_APDU *a);
int client_is_our_response(struct client *cl);
client_search_response(cl);
break;
case ZOOM_EVENT_RECV_RECORD:
- client_record_response(cl);
- got_records = 1;
+ client_record_response(cl, &got_records);
break;
default:
yaz_log(YLOG_LOG, "Unhandled event (%d) from %s",
{
int r = ZOOM_connection_exec_task(co->link);
if (!r)
- {
- const char *error, *addinfo;
- int err;
- if ((err = ZOOM_connection_error(co->link, &error, &addinfo)))
- {
- if (co->client)
- {
- yaz_log(YLOG_LOG, "Error %s from %s",
- error, client_get_id(co->client));
- client_set_diagnostic(co->client, err, error, addinfo);
- client_set_state_nb(co->client, Client_Error);
- }
- }
- }
+ non_block_events(co);
else
{
iochan_setflags(co->iochan, ZOOM_connection_get_mask(co->link));