From 8fb093b27265ab70d1fcc15da57ab319aa6a370e Mon Sep 17 00:00:00 2001 From: Mikal Villa Date: Sun, 24 Jul 2016 17:58:26 +0800 Subject: [PATCH 1/3] Reload client config on SIGHUP --- DaemonLinux.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DaemonLinux.cpp b/DaemonLinux.cpp index 118fc5f5..f6664926 100644 --- a/DaemonLinux.cpp +++ b/DaemonLinux.cpp @@ -13,6 +13,7 @@ #include "FS.h" #include "Log.h" #include "RouterContext.h" +#include "ClientContext.h" void handle_signal(int sig) { @@ -21,6 +22,7 @@ void handle_signal(int sig) case SIGHUP: LogPrint(eLogInfo, "Daemon: Got SIGHUP, reopening log..."); i2p::log::Logger().Reopen (); + i2p::client::context.ReloadConfig(); break; case SIGINT: if (i2p::context.AcceptsTunnels () && !Daemon.gracefullShutdownInterval) From 11585327bf5e08eab1716803922f0d81725c74e7 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 24 Jul 2016 09:24:20 -0400 Subject: [PATCH 2/3] correct status response --- BOB.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/BOB.cpp b/BOB.cpp index aa11c7b8..1ed03281 100644 --- a/BOB.cpp +++ b/BOB.cpp @@ -567,21 +567,21 @@ namespace client if (m_Nickname == operand) { std::stringstream s; - s << "DATA"; s << " NICKNAME:"; s << m_Nickname; + s << "DATA"; s << " NICKNAME: "; s << m_Nickname; if (m_CurrentDestination->GetLocalDestination ()->IsReady ()) - s << " STARTING:false RUNNING:true STOPPING:false"; + s << " STARTING: false RUNNING: true STOPPING: false"; else - s << " STARTING:true RUNNING:false STOPPING:false"; - s << " KEYS: true"; s << " QUIET:"; s << (m_IsQuiet ? "true":"false"); + s << " STARTING: true RUNNING: false STOPPING: false"; + s << " KEYS: true"; s << " QUIET: "; s << (m_IsQuiet ? "true":"false"); if (m_InPort) { - s << " INPORT:" << m_InPort; - s << " INHOST:" << (m_Address.length () > 0 ? m_Address : "127.0.0.1"); + s << " INPORT: " << m_InPort; + s << " INHOST: " << (m_Address.length () > 0 ? m_Address : "127.0.0.1"); } if (m_OutPort) { - s << " OUTPORT:" << m_OutPort; - s << " OUTHOST:" << (m_Address.length () > 0 ? m_Address : "127.0.0.1"); + s << " OUTPORT: " << m_OutPort; + s << " OUTHOST: " << (m_Address.length () > 0 ? m_Address : "127.0.0.1"); } SendReplyOK (s.str().c_str()); } From 061720bcf034ffee29d8f0492211223172fb2544 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 24 Jul 2016 10:20:37 -0400 Subject: [PATCH 3/3] handle'\r\n' terminated address from Transmission --- BOB.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BOB.cpp b/BOB.cpp index 1ed03281..caf766af 100644 --- a/BOB.cpp +++ b/BOB.cpp @@ -70,7 +70,7 @@ namespace client if (eol) { *eol = 0; - + if (eol != receiver->buffer && eol[-1] == '\r') eol[-1] = 0; // workaround for Transmission, it sends '\r\n' terminated address receiver->data = (uint8_t *)eol + 1; receiver->dataLen = receiver->bufferOffset - (eol - receiver->buffer + 1); i2p::data::IdentHash ident;