X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=src%2Fyaz-ir-assoc.cpp;h=a681bf0db8fcff468e22e0a43cfed927a77cc96e;hp=c59359f2146178c3652bfab5ed92d55eacbe2684;hb=HEAD;hpb=217e153abe5e9c5aae6ef74a839bf01d30e295d3 diff --git a/src/yaz-ir-assoc.cpp b/src/yaz-ir-assoc.cpp index c59359f..a681bf0 100644 --- a/src/yaz-ir-assoc.cpp +++ b/src/yaz-ir-assoc.cpp @@ -1,5 +1,5 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) 1998-2013 Index Data and Mike Taylor + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -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); }