diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-01 20:40:05 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-01 20:40:05 +0000 |
commit | acd4daf132c8ff3b05df7615e95f60be2fb82ddb (patch) | |
tree | ff5836cfc26ab245a356d15c90d36ece29f07189 /protocols/MSN/src/msn_p2p.cpp | |
parent | 9de7eaca48475e8e5c7f04b72451983ace0ccee5 (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/MSN/src/msn_p2p.cpp')
-rw-r--r-- | protocols/MSN/src/msn_p2p.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp index 67cb4b9f1a..ef844191b4 100644 --- a/protocols/MSN/src/msn_p2p.cpp +++ b/protocols/MSN/src/msn_p2p.cpp @@ -194,11 +194,10 @@ void CMsnProto::p2p_pictureTransferFailed(filetransfer* ft) case MSN_APPID_AVATAR:
case MSN_APPID_AVATAR2:
{
- PROTO_AVATAR_INFORMATION AI = { 0 };
- AI.cbSize = sizeof(AI);
- AI.hContact = ft->std.hContact;
+ PROTO_AVATAR_INFORMATION ai = { 0 };
+ ai.hContact = ft->std.hContact;
delSetting(ft->std.hContact, "AvatarHash");
- ProtoBroadcastAck(AI.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &AI, 0);
+ ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai, 0);
}
break;
}
@@ -233,13 +232,12 @@ void CMsnProto::p2p_savePicture2disk(filetransfer* ft) case MSN_APPID_AVATAR:
case MSN_APPID_AVATAR2:
{
- PROTO_AVATAR_INFORMATION AI = { 0 };
- AI.cbSize = sizeof(AI);
- AI.format = format;
- AI.hContact = ft->std.hContact;
- MSN_GetAvatarFileName(AI.hContact, AI.filename, SIZEOF(AI.filename), ext);
+ PROTO_AVATAR_INFORMATION ai = { 0 };
+ ai.format = format;
+ ai.hContact = ft->std.hContact;
+ MSN_GetAvatarFileName(ai.hContact, ai.filename, SIZEOF(ai.filename), ext);
- _trename(ft->std.tszCurrentFile, AI.filename);
+ _trename(ft->std.tszCurrentFile, ai.filename);
// Store also avatar hash
char *szAvatarHash = MSN_GetAvatarHash(ft->p2p_object);
@@ -247,9 +245,9 @@ void CMsnProto::p2p_savePicture2disk(filetransfer* ft) mir_free(szAvatarHash);
setString(ft->std.hContact, "PictSavedContext", ft->p2p_object);
- ProtoBroadcastAck(AI.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
+ ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai, 0);
- debugLogA("Avatar for contact %08x saved to file '%s'", AI.hContact, T2Utf(AI.filename));
+ debugLogA("Avatar for contact %08x saved to file '%s'", ai.hContact, T2Utf(ai.filename));
}
break;
|