projects
/
yazpp-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1c58ea2
)
Using cs_get_host_args
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 5 Nov 2015 11:48:50 +0000
(12:48 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 5 Nov 2015 11:48:50 +0000
(12:48 +0100)
src/yaz-ir-assoc.cpp
patch
|
blob
|
history
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);
}