2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Decrypt shiftedDcId / protocolDcId in mtp_ logs.

This commit is contained in:
John Preston
2022-02-07 15:04:16 +03:00
parent 8658dba97a
commit 0aa20b4479
2 changed files with 42 additions and 8 deletions

View File

@@ -1355,8 +1355,8 @@ void SessionPrivate::handleReceived() {
auto sfrom = decryptedInts + 4U; // msg_id + seq_no + length + message
MTP_LOG(_shiftedDcId, ("Recv: ")
+ DumpToText(sfrom, end)
+ QString(" (protocolDcId:%1,key:%2)"
).arg(getProtocolDcId()
+ QString(" (dc:%1,key:%2)"
).arg(AbstractConnection::ProtocolDcDebugId(getProtocolDcId())
).arg(_encryptionKey->keyId()));
const auto registered = _receivedMessageIds.registerMsgId(
@@ -2614,8 +2614,8 @@ bool SessionPrivate::sendSecureRequest(
auto from = request->constData() + 4;
MTP_LOG(_shiftedDcId, ("Send: ")
+ DumpToText(from, from + messageSize)
+ QString(" (protocolDcId:%1,key:%2)"
).arg(getProtocolDcId()
+ QString(" (dc:%1,key:%2)"
).arg(AbstractConnection::ProtocolDcDebugId(getProtocolDcId())
).arg(_encryptionKey->keyId()));
uchar encryptedSHA256[32];