mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 11:04:00 +01:00
Rearrange eol removal for handshake
This commit is contained in:
parent
4ed7e29896
commit
38ebe28923
6
SAM.cpp
6
SAM.cpp
|
@ -85,6 +85,9 @@ namespace client
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_Buffer[bytes_transferred] = 0;
|
m_Buffer[bytes_transferred] = 0;
|
||||||
|
char * eol = (char *)memchr (m_Buffer, '\n', bytes_transferred);
|
||||||
|
if (eol)
|
||||||
|
*eol = 0;
|
||||||
LogPrint ("SAM handshake ", m_Buffer);
|
LogPrint ("SAM handshake ", m_Buffer);
|
||||||
char * separator = strchr (m_Buffer, ' ');
|
char * separator = strchr (m_Buffer, ' ');
|
||||||
if (separator)
|
if (separator)
|
||||||
|
@ -101,9 +104,6 @@ namespace client
|
||||||
if (separator)
|
if (separator)
|
||||||
{
|
{
|
||||||
separator++;
|
separator++;
|
||||||
char *eol = strchr (separator, '\n');
|
|
||||||
if (eol)
|
|
||||||
*eol = 0;
|
|
||||||
std::map<std::string, std::string> params;
|
std::map<std::string, std::string> params;
|
||||||
ExtractParams (separator, params);
|
ExtractParams (separator, params);
|
||||||
auto it = params.find (SAM_PARAM_MAX);
|
auto it = params.find (SAM_PARAM_MAX);
|
||||||
|
|
Loading…
Reference in a new issue