#define MAX_CON 100
+static void process_events(ZOOM_connection *c)
+{
+ int i;
+
+ printf("process_events\n");
+ while ((i = ZOOM_event(MAX_CON, c)) != 0)
+ {
+ int peek = ZOOM_connection_peek_event(c[i-1]);
+ int event = ZOOM_connection_last_event(c[i-1]);
+ printf ("no = %d peek = %d event = %d %s\n", i-1,
+ peek,
+ event,
+ ZOOM_get_event_str(event));
+ }
+}
+
static int next_token(const char **cpp, const char **t_start)
{
int len = 0;
for (i = 0; i < MAX_CON; i++)
ZOOM_resultset_records(r[i], 0, start, count);
- while (ZOOM_event(MAX_CON, c))
- ;
+ process_events(c);
for (i = 0; i < MAX_CON; i++)
{
if (render_str)
type = wrbuf_cstr(render_str);
- /*
- for (i = 0; i < MAX_CON; i++) {
- int num_facets = ZOOM_resultset_facet_size(r[i]);
- ZOOM_resultset_records(r[i], 0, start, count);
- }
- */
- while (ZOOM_event(MAX_CON, c))
- ;
+ process_events(c);
for (i = 0; i < MAX_CON; i++)
{
p[i] = 0;
}
- while (ZOOM_event(MAX_CON, c))
- ;
+ process_events(c);
for (i = 0; i<MAX_CON; i++)
{
}
ZOOM_query_destroy(s);
- while (ZOOM_event(MAX_CON, c))
- ;
+ process_events(c);
for (i = 0; i<MAX_CON; i++)
{
printf("%s: %lld hits\n", ZOOM_connection_option_get(c[i], "host"),
(long long int) ZOOM_resultset_size(r[i]));
+#if 0
/* and display */
display_records(c[i], r[i], start, count, "render");
+#endif
}
}
}
}
ZOOM_query_destroy(query);
- while (ZOOM_event(MAX_CON, c))
- ;
+ process_events(c);
+
for (i = 0; i<MAX_CON; i++)
{
int error;
if (r[i])
ZOOM_resultset_sort(r[i], "yaz", sort_spec);
}
- while (ZOOM_event(MAX_CON, c))
- ;
+ process_events(c);
}
static void cmd_help(ZOOM_connection *c, ZOOM_resultset *r,