projects
/
metaproxy-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:
1ceee16
)
Z39.50 client: fix NULL ptr reference.
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 24 Jun 2010 13:55:38 +0000
(15:55 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 24 Jun 2010 13:55:38 +0000
(15:55 +0200)
The NULL ptr reference could occur if two or more new client was
checked for number of sockets . In this case host in Z39.50 Assoc
would be NULL - prior to call to method 'client'.
src/filter_z3950_client.cpp
patch
|
blob
|
history
diff --git
a/src/filter_z3950_client.cpp
b/src/filter_z3950_client.cpp
index
601af44
..
683c09a
100644
(file)
--- a/
src/filter_z3950_client.cpp
+++ b/
src/filter_z3950_client.cpp
@@
-309,7
+309,7
@@
yf::Z3950Client::Assoc *yf::Z3950Client::Rep::get_assoc(Package &package)
for (; it != m_clients.end(); it++)
{
yf::Z3950Client::Assoc *as = it->second;
- if (!strcmp(as->get_hostname(), host.c_str()))
+ if (!strcmp(as->m_host.c_str(), host.c_str()))
{
number++;
if (!as->m_in_use)