Browse Source

use const size_t instead of size_t

pull/366/head
Jeff Becker 9 years ago
parent
commit
9f1b84d6f2
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
  1. 6
      SAM.cpp

6
SAM.cpp

@ -633,12 +633,12 @@ namespace client @@ -633,12 +633,12 @@ namespace client
{
// get remote peer address
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];
// send remote peer address as base64
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 l = ident_ptr->ToBuffer (ident, ident_len);
const size_t l1 = i2p::data::ByteStreamToBase64 (ident, l, (char *)m_StreamBuffer, SAM_SOCKET_BUFFER_SIZE);
delete[] ident;
m_StreamBuffer[l1] = '\n';
HandleI2PReceive (boost::system::error_code (), l1 +1); // we send identity like it has been received from stream

Loading…
Cancel
Save