Removed Z3950_connection_host.
[yaz-moved-to-github.git] / zoom / zoomtst4.c
index 84fccbb..187b047 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: zoomtst4.c,v 1.2 2001-10-24 21:35:46 adam Exp $
+ * $Id: zoomtst4.c,v 1.4 2001-11-16 09:52:39 adam Exp $
  *
  * Asynchronous multi-target going through proxy doing search and retrieve
  * using present.
@@ -24,7 +24,7 @@ int main(int argc, char **argv)
     int no = argc-3;
     Z3950_connection z[500]; /* allow at most 500 connections */
     Z3950_resultset r[500];  /* and result sets .. */
-    Z3950_search s;
+    Z3950_query q;
     Z3950_options o = Z3950_options_create ();
 
     if (argc < 4)
@@ -47,8 +47,8 @@ int main(int argc, char **argv)
     Z3950_options_set (o, "proxy", argv[1]);
     
     /* create query */
-    s = Z3950_search_create ();
-    if (Z3950_search_prefix (s, argv[argc-1]))
+    q = Z3950_query_create ();
+    if (Z3950_query_prefix (q, argv[argc-1]))
     {
        printf ("bad PQF: %s\n", argv[argc-1]);
        exit (1);
@@ -58,7 +58,7 @@ int main(int argc, char **argv)
     {
        z[i] = Z3950_connection_create (o);
        Z3950_connection_connect (z[i], argv[i+2], 0);
-        r[i] = Z3950_connection_search (z[i], s);
+        r[i] = Z3950_connection_search (z[i], q);
     }
 
     /* network I/O */
@@ -72,11 +72,12 @@ int main(int argc, char **argv)
        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]), errmsg, error, addinfo);
+                    Z3950_connection_option_get(z[i], "host"),
+                     errmsg, error, addinfo);
     }
 
     /* destroy stuff and exit */
-    Z3950_search_destroy (s);
+    Z3950_query_destroy (q);
     for (i = 0; i<no; i++)
     {
         Z3950_resultset_destroy (r[i]);