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/WhatsApp | |
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/WhatsApp')
-rw-r--r-- | protocols/WhatsApp/src/avatars.cpp | 14 | ||||
-rw-r--r-- | protocols/WhatsApp/src/contacts.cpp | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/protocols/WhatsApp/src/avatars.cpp b/protocols/WhatsApp/src/avatars.cpp index 3c5f10d102..35feb6d1ad 100644 --- a/protocols/WhatsApp/src/avatars.cpp +++ b/protocols/WhatsApp/src/avatars.cpp @@ -2,19 +2,19 @@ INT_PTR WhatsAppProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
{
- PROTO_AVATAR_INFORMATION* AI = (PROTO_AVATAR_INFORMATION*)lParam;
+ PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION*)lParam;
- ptrA id(getStringA(AI->hContact, isChatRoom(AI->hContact) ? "ChatRoomID" : WHATSAPP_KEY_ID));
+ ptrA id(getStringA(pai->hContact, isChatRoom(pai->hContact) ? "ChatRoomID" : WHATSAPP_KEY_ID));
if (id == NULL)
return GAIR_NOAVATAR;
- std::tstring tszFileName = GetAvatarFileName(AI->hContact);
- _tcsncpy_s(AI->filename, tszFileName.c_str(), _TRUNCATE);
- AI->format = PA_FORMAT_JPEG;
+ std::tstring tszFileName = GetAvatarFileName(pai->hContact);
+ _tcsncpy_s(pai->filename, tszFileName.c_str(), _TRUNCATE);
+ pai->format = PA_FORMAT_JPEG;
- ptrA szAvatarId(getStringA(AI->hContact, WHATSAPP_KEY_AVATAR_ID));
+ ptrA szAvatarId(getStringA(pai->hContact, WHATSAPP_KEY_AVATAR_ID));
if (szAvatarId == NULL || (wParam & GAIF_FORCE) != 0)
- if (AI->hContact != NULL && m_pConnection != NULL) {
+ if (pai->hContact != NULL && m_pConnection != NULL) {
m_pConnection->sendGetPicture(id, "image");
return GAIR_WAITFOR;
}
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index caa0771f5b..3756fded33 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -165,7 +165,7 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vector<u size_t r = fwrite(std::string(data.begin(), data.end()).c_str(), 1, data.size(), f);
fclose(f);
- PROTO_AVATAR_INFORMATION ai = { sizeof(ai) };
+ PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
ai.format = PA_FORMAT_JPEG;
_tcsncpy_s(ai.filename, filename.c_str(), _TRUNCATE);
|