diff --git a/HTTPServer.cpp b/HTTPServer.cpp
index fdc5b38f..309e3f6b 100644
--- a/HTTPServer.cpp
+++ b/HTTPServer.cpp
@@ -422,7 +422,7 @@ namespace http {
s << " Accept transit tunnels
\r\n";
#if (!defined(WIN32) && !defined(QT_GUI_LIB) && !defined(ANDROID))
if (Daemon.gracefullShutdownInterval)
- s << " Cancel gracefull shutdown";
+ s << " Cancel gracefull shutdown
";
else
s << " Start gracefull shutdown
\r\n";
#endif
@@ -762,8 +762,8 @@ namespace http {
reply.add_header("Content-Type", "text/html");
reply.body = content;
- std::string res = reply.to_string();
- boost::asio::async_write (*m_Socket, boost::asio::buffer(res),
+ m_SendBuffer = reply.to_string();
+ boost::asio::async_write (*m_Socket, boost::asio::buffer(m_SendBuffer),
std::bind (&HTTPConnection::Terminate, shared_from_this (), std::placeholders::_1));
}
diff --git a/HTTPServer.h b/HTTPServer.h
index bf7f5c65..5246af8b 100644
--- a/HTTPServer.h
+++ b/HTTPServer.h
@@ -31,6 +31,7 @@ namespace http {
boost::asio::deadline_timer m_Timer;
char m_Buffer[HTTP_CONNECTION_BUFFER_SIZE + 1];
size_t m_BufferLen;
+ std::string m_SendBuffer;
bool needAuth;
std::string user;
std::string pass;
diff --git a/NTCPSession.cpp b/NTCPSession.cpp
index 1f177aa3..20dc9ab0 100644
--- a/NTCPSession.cpp
+++ b/NTCPSession.cpp
@@ -954,7 +954,7 @@ namespace transport
{
if (ecode)
{
- LogPrint (eLogError, "NTCP: Can't connect to ", conn->GetSocket ().remote_endpoint (), ": ", ecode.message ());
+ LogPrint (eLogError, "NTCP: Connect error ", ecode.message ());
if (ecode != boost::asio::error::operation_aborted)
i2p::data::netdb.SetUnreachable (conn->GetRemoteIdentity ()->GetIdentHash (), true);
conn->Terminate ();
diff --git a/Reseed.cpp b/Reseed.cpp
index 48d7a53f..21635791 100644
--- a/Reseed.cpp
+++ b/Reseed.cpp
@@ -345,11 +345,21 @@ namespace data
// extract issuer name
char name[100];
X509_NAME_oneline (X509_get_issuer_name(cert), name, 100);
+ char * cn = strstr (name, "CN=");
+ if (cn)
+ {
+ cn += 3;
+ char * terminator = strchr (cn, '/');
+ if (terminator) terminator[0] = 0;
+ }
// extract RSA key (we need n only, e = 65537)
RSA * key = X509_get_pubkey (cert)->pkey.rsa;
PublicKey value;
i2p::crypto::bn2buf (key->n, value, 512);
- m_SigningKeys[name] = value;
+ if (cn)
+ m_SigningKeys[cn] = value;
+ else
+ LogPrint (eLogError, "Reseed: Can't find CN field in ", filename);
}
SSL_free (ssl);
}
diff --git a/SSU.cpp b/SSU.cpp
index 3d3fefdd..72091e00 100644
--- a/SSU.cpp
+++ b/SSU.cpp
@@ -77,6 +77,8 @@ namespace transport
{
DeleteAllSessions ();
m_IsRunning = false;
+ m_TerminationTimer.cancel ();
+ m_TerminationTimerV6.cancel ();
m_Service.stop ();
m_Socket.close ();
m_ServiceV6.stop ();