Retain cs_create_host_proxy and use blank for optional bind host
[yaz-moved-to-github.git] / client / client.c
index d64884c..596b76a 100644 (file)
@@ -151,7 +151,6 @@ static Odr_int last_hit_count = 0;
 static int pretty_xml = 0;
 static Odr_int sru_maximumRecords = 0;
 static yaz_cookies_t yaz_cookies = 0;
-static char *bind_host = 0;
 
 typedef enum {
     QueryType_Prefix,
@@ -704,7 +703,7 @@ static int session_connect_base(const char *arg, const char **basep)
     strncpy(type_and_host, arg, sizeof(type_and_host)-1);
     type_and_host[sizeof(type_and_host)-1] = '\0';
 
-    conn = cs_create_host2(arg, 1, &add, yazProxy, bind_host);
+    conn = cs_create_host_proxy(arg, 1, &add, yazProxy);
     if (!conn)
     {
         printf("Could not resolve address %s\n", arg);
@@ -756,15 +755,6 @@ static int session_connect(void)
     return r;
 }
 
-static int cmd_bind(const char *arg)
-{
-    xfree(bind_host);
-    bind_host = 0;
-    if (arg && *arg)
-        bind_host = xstrdup(arg);
-    return 0;
-}
-
 static int cmd_open(const char *arg)
 {
     int r;
@@ -5061,7 +5051,6 @@ static struct {
     {"init", cmd_init, "", NULL,0,NULL},
     {"sru", cmd_sru, "<method> <version>", NULL,0,NULL},
     {"url", cmd_url, "<url>", NULL,0,NULL},
-    {"bind", cmd_bind, "<host>", NULL,0,NULL},
     {"exit", cmd_quit, "",NULL,0,NULL},
     {0,0,0,0,0,0}
 };