From: Adam Dickmeiss Date: Thu, 5 Nov 2015 11:48:50 +0000 (+0100) Subject: Using cs_get_host_args X-Git-Tag: v1.6.4~7 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=09840dc91369b6db098188a74ce1d9988ede400b;p=yazpp-moved-to-github.git Using cs_get_host_args --- diff --git a/src/yaz-ir-assoc.cpp b/src/yaz-ir-assoc.cpp index 5f97d4f..a681bf0 100644 --- a/src/yaz-ir-assoc.cpp +++ b/src/yaz-ir-assoc.cpp @@ -11,6 +11,7 @@ #include #include #include +#include using namespace yazpp_1; @@ -302,9 +303,10 @@ void IR_Assoc::client(const char *addr) delete [] m_host; m_host = new char[strlen(addr)+1]; strcpy(m_host, addr); - const char *dbpart = strchr(m_host, '/'); - if (dbpart) - set_databaseNames (dbpart+1, "+ "); + const char *dbpart = 0; + cs_get_host_args(m_host, &dbpart); + if (dbpart && *dbpart) + set_databaseNames (dbpart, "+ "); Z_Assoc::client(m_proxy ? m_proxy : m_host); }