From a3358bdf6c14082595b1008663d60bb49f468deb Mon Sep 17 00:00:00 2001 From: LittleVulpix Date: Mon, 6 Feb 2017 07:55:10 +0100 Subject: Add pubkey log to avatar transfer initiation for debugging. This helps in case we get spammed with avatar requests - to see which tox is causing it. example of spam: [06:48:45 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:48:45 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:48:46 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:48:46 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:48:54 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:48:54 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:48:54 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:48:54 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:03 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:03 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:03 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:03 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:12 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:12 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:12 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:12 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:21 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:21 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:21 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:21 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:30 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:30 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:30 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:30 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:39 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:39 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled [06:49:39 1E30] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0) [06:49:39 1E30] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled --- protocols/Tox/src/tox_transfer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/Tox') diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index c00cc4bf59..b66ad34d13 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -16,7 +16,7 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u { case TOX_FILE_KIND_AVATAR: { - Netlib_Logf(proto->m_hNetlibUser, __FUNCTION__": incoming avatar (%d) from (%d)", fileNumber, friendNumber); + Netlib_Logf(proto->m_hNetlibUser, __FUNCTION__": incoming avatar (%d) from %s(%d)", fileNumber, (const char*)pubKey, friendNumber); ptrW address(proto->getWStringA(hContact, TOX_SETTINGS_ID)); wchar_t avatarName[MAX_PATH]; @@ -402,4 +402,4 @@ void CToxProto::OnFileRequest(Tox*, uint32_t friendNumber, uint32_t fileNumber, break; } } -} \ No newline at end of file +} -- cgit v1.2.3