/*
- * $Id: zoomtst6.c,v 1.4 2001-11-15 08:58:29 adam Exp $
+ * $Id: zoomtst6.c,v 1.6 2001-11-16 09:52:39 adam Exp $
*
* Asynchronous multi-target client doing two searches
*/
int pos;
printf ("%s: %d hits\n", tname, Z3950_resultset_size(r));
/* go through all records at target */
- for (pos = 0; pos < 20; pos++)
+ for (pos = 0; pos < 2; pos++)
{
Z3950_record rec = Z3950_resultset_record (r, pos);
for (i = 0; i<no; i++)
r2[i] = Z3950_connection_search (z[i], q);
+
+ /* network I/O */
+ while (Z3950_event (no, z))
+ ;
+
+ for (i = 0; i<no; i++)
+ Z3950_resultset_records (r1[i], 0, 4, 1);
+
/* network I/O */
while (Z3950_event (no, z))
;
const char *errmsg, *addinfo;
if ((error = Z3950_connection_error(z[i], &errmsg, &addinfo)))
fprintf (stderr, "%s error: %s (%d) %s\n",
- Z3950_connection_host(z[i]),
+ Z3950_connection_option_get(z[i], "host"),
errmsg, error, addinfo);
else
{
- display_records (Z3950_connection_host(z[i]), r1[i]);
- display_records (Z3950_connection_host(z[i]), r2[i]);
+ display_records (Z3950_connection_option_get(z[i], "host"), r1[i]);
+ display_records (Z3950_connection_option_get(z[i], "host"), r2[i]);
}
}
/* destroy stuff and exit */