diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-09 08:16:03 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-09 08:16:03 +0000 |
commit | 8946d725ef85d8ebabcc1aff8c1c46577f29cd93 (patch) | |
tree | 1739244d3f2493631fe4fcd97a6ddb6a9263e890 /protocols/SkypeWeb | |
parent | b1582b887972892b58cc93ddc12c9bd854c0d489 (diff) |
fixed own avatar loading
git-svn-id: http://svn.miranda-ng.org/main/trunk@12690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_avatars.cpp | 9 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_login.cpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 0f792d5e2f..94b890fe74 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -44,9 +44,9 @@ void CSkypeProto::OnReceiveAvatar(const NETLIBHTTPREQUEST *response, void *arg) return;
PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) };
- GetAvatarFileName(hContact, AI.filename, SIZEOF(AI.filename));
AI.format = ProtoGetBufferFormat(response->pData);
- setByte(AI.hContact, "AvatarType", AI.format);
+ setByte(hContact, "AvatarType", AI.format);
+ GetAvatarFileName(hContact, AI.filename, SIZEOF(AI.filename));
FILE *out = _tfopen(AI.filename, _T("wb"));
if (out == NULL) {
@@ -78,13 +78,12 @@ INT_PTR CSkypeProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam) if (szUrl == NULL)
return GAIR_NOAVATAR;
+ AI->format = getByte(AI->hContact, "AvatarType", PA_FORMAT_JPEG);
+
TCHAR tszFileName[MAX_PATH];
GetAvatarFileName(AI->hContact, tszFileName, SIZEOF(tszFileName));
_tcsncpy(AI->filename, tszFileName, SIZEOF(AI->filename));
- AI->format = ProtoGetAvatarFormat(AI->filename);
- setByte(AI->hContact, "AvatarType", AI->format);
-
if (::_taccess(AI->filename, 0) == 0 && !getBool(AI->hContact, "NeedNewAvatar", 0))
return GAIR_SUCCESS;
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index ed0ac93cf4..d4c5e8b465 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -92,6 +92,8 @@ void CSkypeProto::OnLoginSecond(const NETLIBHTTPREQUEST *response) PushRequest(new CreateEndpointRequest(token.c_str()), &CSkypeProto::OnEndpointCreated);
PushRequest(new GetProfileRequest(token.c_str()), &CSkypeProto::LoadProfile);
+ ptrA szUrl(getStringA("AvatarUrl"));
+ PushRequest(new GetAvatarRequest(szUrl), &CSkypeProto::OnReceiveAvatar, NULL);
PushRequest(new GetContactListRequest(token.c_str()), &CSkypeProto::LoadContactList);
}
|