From 201d4c2175aab1032564893022e618098e81225d Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 16 Oct 2015 17:43:50 +0000 Subject: SkypeWeb: - Minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@15567 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/main.cpp | 3 ++- protocols/SkypeWeb/src/skype_avatars.cpp | 6 ++---- protocols/SkypeWeb/src/stdafx.h | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index de9d3c8164..108c0c9968 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -20,6 +20,7 @@ along with this program. If not, see . int hLangpack; HINSTANCE g_hInstance; CLIST_INTERFACE *pcli; +FI_INTERFACE *fii = NULL; char g_szMirVer[100]; HANDLE g_hCallEvent; @@ -56,7 +57,7 @@ extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfo); mir_getCLI(); - + CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii); CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof(g_szMirVer), LPARAM(g_szMirVer)); PROTOCOLDESCRIPTOR pd = { 0 }; diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 7622ad09e4..7fe125dab6 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -186,14 +186,12 @@ INT_PTR CSkypeProto::SvcSetMyAvatar(WPARAM, LPARAM lParam) if (data != NULL && fread(data, sizeof(BYTE), length, hFile) == length) { - FI_INTERFACE *fii = NULL; const char *szMime = "image/jpeg"; - if (CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii) == S_OK && fii) - { + if (fii) szMime = fii->FI_GetFIFMimeType(fii->FI_GetFIFFromFilenameU(path)); - } PushRequest(new SetAvatarRequest(data, length, szMime, li), &CSkypeProto::OnSentAvatar); + fclose(hFile); return 0; } } diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h index 3cd549bc7e..78f57f9d37 100644 --- a/protocols/SkypeWeb/src/stdafx.h +++ b/protocols/SkypeWeb/src/stdafx.h @@ -58,6 +58,7 @@ struct CSkypeProto; extern HINSTANCE g_hInstance; extern char g_szMirVer[]; extern HANDLE g_hCallEvent; +extern FI_INTERFACE *fii; #define SKYPE_ENDPOINTS_HOST "client-s.gateway.messenger.live.com" -- cgit v1.2.3