X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=comstack%2Fcomstack.c;fp=comstack%2Fcomstack.c;h=b621522922b9953ae4780ad23fabf5b8462ac2bb;hp=a9d73bdecb087cf4cae1a06c31781505c4aa9d8e;hb=30de094a4a567f7fada6d5932e23921770ac671c;hpb=b75023664b529d1cd0dccac2deae78ddbd681369 diff --git a/comstack/comstack.c b/comstack/comstack.c index a9d73bd..b621522 100644 --- a/comstack/comstack.c +++ b/comstack/comstack.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: comstack.c,v 1.12 2003-02-21 12:08:57 adam Exp $ + * $Id: comstack.c,v 1.13 2003-03-11 11:05:19 adam Exp $ */ #include @@ -36,6 +36,24 @@ const char *cs_strerror(COMSTACK h) return cs_errmsg(h->cerrno); } +void cs_get_host_args(const char *type_and_host, const char **args) +{ + + *args = ""; + if (*type_and_host && strncmp(type_and_host, "unix:", 5)) + { + const char *cp; + cp = strstr(type_and_host, "://"); + if (cp) + cp = cp+3; + else + cp = type_and_host; + cp = strchr(cp, '/'); + if (cp) + *args = cp+1; + } +} + COMSTACK cs_create_host(const char *type_and_host, int blocking, void **vp) { enum oid_proto proto = PROTO_Z3950;