projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
z3950_client: client_ip controls client-IP presence
[metaproxy-moved-to-github.git]
/
src
/
filter_frontend_net.cpp
diff --git
a/src/filter_frontend_net.cpp
b/src/filter_frontend_net.cpp
index
ec0e78e
..
9313411
100644
(file)
--- a/
src/filter_frontend_net.cpp
+++ b/
src/filter_frontend_net.cpp
@@
-1,5
+1,5
@@
/* This file is part of Metaproxy.
/* This file is part of Metaproxy.
- Copyright (C) 2005-2013 Index Data
+ Copyright (C) Index Data
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-277,6
+277,12
@@
yf::FrontendNet::ZAssocChild::ZAssocChild(
const char *peername = PDU_Observable->getpeername();
if (!peername)
peername = "unknown";
const char *peername = PDU_Observable->getpeername();
if (!peername)
peername = "unknown";
+ else
+ {
+ const char *cp = strchr(peername, ':');
+ if (cp)
+ peername = cp + 1;
+ }
m_origin.set_tcpip_address(std::string(peername), m_session.id());
timeout(m_p->m_session_timeout);
}
m_origin.set_tcpip_address(std::string(peername), m_session.id());
timeout(m_p->m_session_timeout);
}
@@
-594,9
+600,13
@@
void yf::FrontendNet::process(mp::Package &package) const
while (m_p->mySocketManager.processEvent() > 0)
{
if (m_p->m_stop_signo == SIGTERM)
while (m_p->mySocketManager.processEvent() > 0)
{
if (m_p->m_stop_signo == SIGTERM)
+ {
+ yaz_log(YLOG_LOG, "metaproxy received SIGTERM");
break; /* stop right away */
break; /* stop right away */
+ }
if (m_p->m_stop_signo == SIGUSR1)
{ /* just stop listeners and cont till all sessions are done*/
if (m_p->m_stop_signo == SIGUSR1)
{ /* just stop listeners and cont till all sessions are done*/
+ yaz_log(YLOG_LOG, "metaproxy received SIGUSR1");
m_p->m_stop_signo = 0;
if (m_p->az)
{
m_p->m_stop_signo = 0;
if (m_p->az)
{