summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/poll.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-01 18:10:32 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-01 18:10:32 +0000
commit2bb514f4195c99b52e0ec748c975c0fd30dbbd25 (patch)
treee7325f314a828e1233b89ef688e6e52a8846925a /plugins/AVS/src/poll.cpp
parenta59538975c7fef04bcbf9e62b81c78753ac2a16c (diff)
another bunch of dead crutches: non-unicode avatar services
git-svn-id: http://svn.miranda-ng.org/main/trunk@13961 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS/src/poll.cpp')
-rw-r--r--plugins/AVS/src/poll.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp
index 4911fb0e41..a0d92ebc98 100644
--- a/plugins/AVS/src/poll.cpp
+++ b/plugins/AVS/src/poll.cpp
@@ -140,7 +140,7 @@ void QueueAdd(MCONTACT hContact)
QueueAdd(hContact, waitTime);
}
-void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto)
+void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATION *pai, const char *szProto)
{
QueueRemove(hContact);
@@ -201,24 +201,14 @@ int FetchAvatarFor(MCONTACT hContact, char *szProto)
if (szProto != NULL && PollProtocolCanHaveAvatar(szProto) && PollContactCanHaveAvatar(hContact, szProto)) {
// Can have avatar, but must request it?
- if ((g_AvatarHistoryAvail && CallService(MS_AVATARHISTORY_ENABLED, hContact, 0)) ||
- (PollCheckProtocol(szProto) && PollCheckContact(hContact)))
+ if ((g_AvatarHistoryAvail && CallService(MS_AVATARHISTORY_ENABLED, hContact, 0)) || (PollCheckProtocol(szProto) && PollCheckContact(hContact)))
{
// Request it
- PROTO_AVATAR_INFORMATIONT pai_s = { 0 };
- pai_s.cbSize = sizeof(pai_s);
+ PROTO_AVATAR_INFORMATION pai_s = { 0 };
pai_s.hContact = hContact;
- INT_PTR res = CallProtoService(szProto, PS_GETAVATARINFOT, GAIF_FORCE, (LPARAM)&pai_s);
- if (res == CALLSERVICE_NOTFOUND) {
- PROTO_AVATAR_INFORMATION pai = { 0 };
- pai.cbSize = sizeof(pai);
- pai.hContact = hContact;
- res = CallProtoService(szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&pai);
- MultiByteToWideChar(CP_ACP, 0, pai.filename, -1, pai_s.filename, SIZEOF(pai_s.filename));
- pai_s.format = pai.format;
- }
-
- if (res != CALLSERVICE_NOTFOUND) result = res;
+ INT_PTR res = CallProtoService(szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&pai_s);
+ if (res != CALLSERVICE_NOTFOUND)
+ result = res;
ProcessAvatarInfo(pai_s.hContact, result, &pai_s, szProto);
}
}