summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_avatar.cpp
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/MSN/src/msn_avatar.cpp
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/MSN/src/msn_avatar.cpp')
-rw-r--r--protocols/MSN/src/msn_avatar.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_avatar.cpp b/protocols/MSN/src/msn_avatar.cpp
index 199de8d362..9ca0fbadc3 100644
--- a/protocols/MSN/src/msn_avatar.cpp
+++ b/protocols/MSN/src/msn_avatar.cpp
@@ -76,20 +76,20 @@ LBL_Error:
if (fmt == PA_FORMAT_UNKNOWN)
goto LBL_Error;
- PROTO_AVATAR_INFORMATION AI = { sizeof(AI) };
- AI.format = fmt;
- AI.hContact = p->hContact;
- MSN_GetAvatarFileName(AI.hContact, AI.filename, SIZEOF(AI.filename), szExt);
- _tremove(AI.filename);
+ PROTO_AVATAR_INFORMATION ai = { 0 };
+ ai.format = fmt;
+ ai.hContact = p->hContact;
+ MSN_GetAvatarFileName(ai.hContact, ai.filename, SIZEOF(ai.filename), szExt);
+ _tremove(ai.filename);
- int fileId = _topen(AI.filename, _O_CREAT | _O_TRUNC | _O_WRONLY | O_BINARY, _S_IREAD | _S_IWRITE);
+ int fileId = _topen(ai.filename, _O_CREAT | _O_TRUNC | _O_WRONLY | O_BINARY, _S_IREAD | _S_IWRITE);
if (fileId == -1)
goto LBL_Error;
_write(fileId, nlhrReply->pData, (unsigned)nlhrReply->dataLength);
_close(fileId);
- ProtoBroadcastAck(p->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
+ ProtoBroadcastAck(p->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai, 0);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply);
return true;
}