mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 20:19:34 +00:00
epee: don't log raw packet data
This commit is contained in:
parent
16c780d568
commit
daf023de6e
1 changed files with 4 additions and 4 deletions
|
@ -562,7 +562,7 @@ PRAGMA_WARNING_DISABLE_VS(4355)
|
||||||
{ // LOCK: chunking
|
{ // LOCK: chunking
|
||||||
epee::critical_region_t<decltype(m_chunking_lock)> send_guard(m_chunking_lock); // *** critical ***
|
epee::critical_region_t<decltype(m_chunking_lock)> send_guard(m_chunking_lock); // *** critical ***
|
||||||
|
|
||||||
MDEBUG("do_send() will SPLIT into small chunks, from packet="<<message_size<<" B for ptr="<<message_data);
|
MDEBUG("do_send() will SPLIT into small chunks, from packet="<<message_size<<" B for ptr="<<(const void*)message_data);
|
||||||
// 01234567890
|
// 01234567890
|
||||||
// ^^^^ (pos=0, len=4) ; pos:=pos+len, pos=4
|
// ^^^^ (pos=0, len=4) ; pos:=pos+len, pos=4
|
||||||
// ^^^^ (pos=4, len=4) ; pos:=pos+len, pos=8
|
// ^^^^ (pos=4, len=4) ; pos:=pos+len, pos=8
|
||||||
|
@ -575,14 +575,14 @@ PRAGMA_WARNING_DISABLE_VS(4355)
|
||||||
while (!message.empty()) {
|
while (!message.empty()) {
|
||||||
byte_slice chunk = message.take_slice(chunksize_good);
|
byte_slice chunk = message.take_slice(chunksize_good);
|
||||||
|
|
||||||
MDEBUG("chunk_start="<<(void*)chunk.data()<<" ptr="<<message_data<<" pos="<<(chunk.data() - message_data));
|
MDEBUG("chunk_start="<<(void*)chunk.data()<<" ptr="<<(const void*)message_data<<" pos="<<(chunk.data() - message_data));
|
||||||
MDEBUG("part of " << message.size() << ": pos="<<(chunk.data() - message_data) << " len="<<chunk.size());
|
MDEBUG("part of " << message.size() << ": pos="<<(chunk.data() - message_data) << " len="<<chunk.size());
|
||||||
|
|
||||||
bool ok = do_send_chunk(std::move(chunk)); // <====== ***
|
bool ok = do_send_chunk(std::move(chunk)); // <====== ***
|
||||||
|
|
||||||
all_ok = all_ok && ok;
|
all_ok = all_ok && ok;
|
||||||
if (!all_ok) {
|
if (!all_ok) {
|
||||||
MDEBUG("do_send() DONE ***FAILED*** from packet="<<message_size<<" B for ptr="<<message_data);
|
MDEBUG("do_send() DONE ***FAILED*** from packet="<<message_size<<" B for ptr="<<(const void*)message_data);
|
||||||
MDEBUG("do_send() SEND was aborted in middle of big package - this is mostly harmless "
|
MDEBUG("do_send() SEND was aborted in middle of big package - this is mostly harmless "
|
||||||
<< " (e.g. peer closed connection) but if it causes trouble tell us at #monero-dev. " << message_size);
|
<< " (e.g. peer closed connection) but if it causes trouble tell us at #monero-dev. " << message_size);
|
||||||
return false; // partial failure in sending
|
return false; // partial failure in sending
|
||||||
|
@ -590,7 +590,7 @@ PRAGMA_WARNING_DISABLE_VS(4355)
|
||||||
// (in catch block, or uniq pointer) delete buf;
|
// (in catch block, or uniq pointer) delete buf;
|
||||||
} // each chunk
|
} // each chunk
|
||||||
|
|
||||||
MDEBUG("do_send() DONE SPLIT from packet="<<message_size<<" B for ptr="<<message_data);
|
MDEBUG("do_send() DONE SPLIT from packet="<<message_size<<" B for ptr="<<(const void*)message_data);
|
||||||
|
|
||||||
MDEBUG("do_send() m_connection_type = " << m_connection_type);
|
MDEBUG("do_send() m_connection_type = " << m_connection_type);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue