diff options
-rw-r--r-- | protocols/SkypeWeb/src/main.cpp | 3 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_avatars.cpp | 6 | ||||
-rw-r--r-- | 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 <http://www.gnu.org/licenses/>. 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"
|