This commit is contained in:
xcps 2016-02-28 22:32:34 +05:00
parent 57a53b4b6c
commit 7b39a12396

View File

@ -245,12 +245,11 @@ namespace client
{
char *p = (char*)(buf + len);
*p = '\0';
LogPrint (eLogError, "======= packet received =====\n", buf, "==============\n");
std::string line;
std::string line;
m_OutPacket.str ("");
m_InPacket.str ("");
m_InPacket.clear ();
m_InPacket.write ((const char *)buf, len);
LogPrint (eLogError, "======= inpacket =====\n", m_InPacket.str ().c_str (), "==============\n");
while (!m_InPacket.eof () && !m_InPacket.fail ())
{
@ -272,7 +271,6 @@ namespace client
m_OutPacket << line << '\n';
}
}
LogPrint (eLogError, "======= outpacket =====\n", m_OutPacket.str ().substr (0, m_OutPacket.str ().length ()), "============\n");
I2PTunnelConnection::Write ((uint8_t *)m_OutPacket.str ().c_str (), m_OutPacket.str ().length ());
}