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/Steam/src/steam_contacts.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/Steam/src/steam_contacts.cpp')
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index fd43933e72..fa6f2c0965 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -520,28 +520,28 @@ void CSteamProto::OnGotUserSummaries(const NETLIBHTTPREQUEST *response) void CSteamProto::OnGotAvatar(const NETLIBHTTPREQUEST *response, void *arg) { - PROTO_AVATAR_INFORMATION pai = { sizeof(pai) }; - pai.hContact = (MCONTACT)arg; - GetDbAvatarInfo(pai); + PROTO_AVATAR_INFORMATION ai = { 0 }; + ai.hContact = (MCONTACT)arg; + GetDbAvatarInfo(ai); if (response == NULL || response->resultCode != HTTP_STATUS_OK) { - ptrA steamId(getStringA(pai.hContact, "SteamID")); + ptrA steamId(getStringA(ai.hContact, "SteamID")); debugLogA("CSteamProto::OnGotAvatar: failed to get avatar %s", steamId); - if (pai.hContact) - ProtoBroadcastAck(pai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&pai, 0); + if (ai.hContact) + ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, 0); return; } - FILE *fp = _tfopen(pai.filename, _T("wb")); + FILE *fp = _tfopen(ai.filename, _T("wb")); if (fp) { fwrite(response->pData, sizeof(char), response->dataLength, fp); fclose(fp); - if (pai.hContact) - ProtoBroadcastAck(pai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0); + if (ai.hContact) + ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0); else CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0); } |