mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
use const size_t instead of size_t
This commit is contained in:
parent
babcbcbcea
commit
9f1b84d6f2
6
SAM.cpp
6
SAM.cpp
@ -633,12 +633,12 @@ namespace client
|
|||||||
{
|
{
|
||||||
// get remote peer address
|
// get remote peer address
|
||||||
auto ident_ptr = stream->GetRemoteIdentity();
|
auto ident_ptr = stream->GetRemoteIdentity();
|
||||||
size_t ident_len = ident_ptr->GetFullLen();
|
const size_t ident_len = ident_ptr->GetFullLen();
|
||||||
uint8_t* ident = new uint8_t[ident_len];
|
uint8_t* ident = new uint8_t[ident_len];
|
||||||
|
|
||||||
// send remote peer address as base64
|
// send remote peer address as base64
|
||||||
size_t l = ident_ptr->ToBuffer (ident, ident_len);
|
const size_t l = ident_ptr->ToBuffer (ident, ident_len);
|
||||||
size_t l1 = i2p::data::ByteStreamToBase64 (ident, l, (char *)m_StreamBuffer, SAM_SOCKET_BUFFER_SIZE);
|
const size_t l1 = i2p::data::ByteStreamToBase64 (ident, l, (char *)m_StreamBuffer, SAM_SOCKET_BUFFER_SIZE);
|
||||||
delete[] ident;
|
delete[] ident;
|
||||||
m_StreamBuffer[l1] = '\n';
|
m_StreamBuffer[l1] = '\n';
|
||||||
HandleI2PReceive (boost::system::error_code (), l1 +1); // we send identity like it has been received from stream
|
HandleI2PReceive (boost::system::error_code (), l1 +1); // we send identity like it has been received from stream
|
||||||
|
Loading…
x
Reference in New Issue
Block a user