publish local destinations created by SAM session

This commit is contained in:
orignal 2014-09-27 08:11:00 -04:00
parent 05148a2579
commit d04957bd15
4 changed files with 33 additions and 29 deletions

View file

@ -186,7 +186,8 @@ namespace stream
size_t l = session->localDestination->GetPrivateKeys ().ToBuffer (ident, 1024);
size_t l1 = i2p::data::ByteStreamToBase64 (ident, l, m_Buffer + sizeof (SAM_SESSION_CREATE_REPLY_OK),
SAM_SOCKET_BUFFER_SIZE - sizeof (SAM_SESSION_CREATE_REPLY_OK));
SendMessageReply (m_Buffer, sizeof (SAM_SESSION_CREATE_REPLY_OK) + l1, false);
m_Buffer[sizeof (SAM_SESSION_CREATE_REPLY_OK) + l1] = '\n';
SendMessageReply (m_Buffer, sizeof (SAM_SESSION_CREATE_REPLY_OK) + l1 + 1, false);
}
else
SendMessageReply (SAM_SESSION_CREATE_DUPLICATED_ID, sizeof(SAM_SESSION_CREATE_DUPLICATED_ID), true);