From acd4daf132c8ff3b05df7615e95f60be2fb82ddb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Jun 2015 20:40:05 +0000 Subject: various quirks with PROTO_AVATAR_INFORMATION declarations git-svn-id: http://svn.miranda-ng.org/main/trunk@13965 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/main.cpp | 14 ++++++-------- protocols/Xfire/src/processbuddyinfo.cpp | 10 +++++----- 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'protocols/Xfire') diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index ef2bd0e77f..15907ac515 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1782,17 +1782,15 @@ void SetAvatar(void *arg) if (xsa->hContact == NULL) return; - if (GetAvatar(xsa->username, &av)) - { - PROTO_AVATAR_INFORMATION AI; - AI.format = av.type; - AI.hContact = xsa->hContact; - mir_tstrcpy(AI.filename, _A2T(av.file)); - ProtoBroadcastAck(protocolname, xsa->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&AI, 0); + if (GetAvatar(xsa->username, &av)) { + PROTO_AVATAR_INFORMATION ai; + ai.format = av.type; + ai.hContact = xsa->hContact; + _tcsncpy_s(ai.filename, _A2T(av.file), _TRUNCATE); + ProtoBroadcastAck(protocolname, xsa->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0); } delete(xsa); - //ReleaseMutex(hMutex); lasttime -= sleep; } diff --git a/protocols/Xfire/src/processbuddyinfo.cpp b/protocols/Xfire/src/processbuddyinfo.cpp index 7d03146da4..26b9697d71 100644 --- a/protocols/Xfire/src/processbuddyinfo.cpp +++ b/protocols/Xfire/src/processbuddyinfo.cpp @@ -90,11 +90,11 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c { db_set_dw(hcontact, "ContactPhoto", "XFireAvatarId", buddyinfo->avatarid); db_set_b(hcontact, "ContactPhoto", "XFireAvatarMode", buddyinfo->avatarmode); - PROTO_AVATAR_INFORMATION AI; - AI.format = type; - AI.hContact = hcontact; - mir_tstrcpy(AI.filename, _A2T(filename)); - ProtoBroadcastAck(protocolname, hcontact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&AI, 0); + PROTO_AVATAR_INFORMATION ai; + ai.format = type; + ai.hContact = hcontact; + _tcsncpy_s(ai.filename, _A2T(filename), _TRUNCATE); + ProtoBroadcastAck(protocolname, hcontact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0); } else //eigenen avatar setzen { -- cgit v1.2.3