projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Using cs_get_host_args
[yazpp-moved-to-github.git]
/
src
/
yaz-ir-assoc.cpp
diff --git
a/src/yaz-ir-assoc.cpp
b/src/yaz-ir-assoc.cpp
index
5f97d4f
..
a681bf0
100644
(file)
--- a/
src/yaz-ir-assoc.cpp
+++ b/
src/yaz-ir-assoc.cpp
@@
-11,6
+11,7
@@
#include <yaz/log.h>
#include <yazpp/ir-assoc.h>
#include <yaz/oid_db.h>
#include <yaz/log.h>
#include <yazpp/ir-assoc.h>
#include <yaz/oid_db.h>
+#include <yaz/comstack.h>
using namespace yazpp_1;
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);
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);
}
Z_Assoc::client(m_proxy ? m_proxy : m_host);
}