summaryrefslogtreecommitdiff
path: root/protocols/Xfire
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-01 20:40:05 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-01 20:40:05 +0000
commitacd4daf132c8ff3b05df7615e95f60be2fb82ddb (patch)
treeff5836cfc26ab245a356d15c90d36ece29f07189 /protocols/Xfire
parent9de7eaca48475e8e5c7f04b72451983ace0ccee5 (diff)
various quirks with PROTO_AVATAR_INFORMATION declarations
git-svn-id: http://svn.miranda-ng.org/main/trunk@13965 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire')
-rw-r--r--protocols/Xfire/src/main.cpp14
-rw-r--r--protocols/Xfire/src/processbuddyinfo.cpp10
2 files changed, 11 insertions, 13 deletions
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
{