projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only consider bind host for TCP comstack
[yaz-moved-to-github.git]
/
src
/
comstack.c
diff --git
a/src/comstack.c
b/src/comstack.c
index
ee64fc8
..
1d0ee94
100644
(file)
--- a/
src/comstack.c
+++ b/
src/comstack.c
@@
-175,8
+175,8
@@
COMSTACK cs_create_host(const char *vhost, int blocking, void **vp)
return cs_create_host_proxy(vhost, blocking, vp, 0);
}
return cs_create_host_proxy(vhost, blocking, vp, 0);
}
-COMSTACK cs_create_host2(const char *vhost, int blocking, void **vp,
- const char *proxy_host, const char *bind_host)
+COMSTACK cs_create_host_proxy(const char *vhost, int blocking, void **vp,
+ const char *proxy_host)
{
enum oid_proto proto = PROTO_Z3950;
const char *host = 0;
{
enum oid_proto proto = PROTO_Z3950;
const char *host = 0;
@@
-198,6
+198,11
@@
COMSTACK cs_create_host2(const char *vhost, int blocking, void **vp,
if (t == tcpip_type)
{
if (t == tcpip_type)
{
+ const char *bind_host = strchr(vhost, ' ');
+ if (bind_host && bind_host[1])
+ bind_host++;
+ else
+ bind_host = 0;
cs = yaz_tcpip_create2(-1, blocking, proto, connect_host ? host : 0,
bind_host);
}
cs = yaz_tcpip_create2(-1, blocking, proto, connect_host ? host : 0,
bind_host);
}
@@
-217,12
+222,6
@@
COMSTACK cs_create_host2(const char *vhost, int blocking, void **vp,
return cs;
}
return cs;
}
-COMSTACK cs_create_host_proxy(const char *vhost, int blocking, void **vp,
- const char *proxy_host)
-{
- return cs_create_host2(vhost, blocking, vp, proxy_host, 0);
-}
-
int cs_look (COMSTACK cs)
{
return cs->event;
int cs_look (COMSTACK cs)
{
return cs->event;