From 2bb514f4195c99b52e0ec748c975c0fd30dbbd25 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Jun 2015 18:10:32 +0000 Subject: 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 --- plugins/AVS/src/poll.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'plugins/AVS/src/poll.cpp') 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); } } -- cgit v1.2.3