diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-10-16 17:43:50 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-10-16 17:43:50 +0000 |
commit | 201d4c2175aab1032564893022e618098e81225d (patch) | |
tree | fbf86274830a233c1dd3d493a7c18c3178823f71 /protocols | |
parent | 59cc9dc475c94284bd3f8f1fc14bfcc7f9da1d1e (diff) |
SkypeWeb:
- Minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15567 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-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"
|