summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Skype/src/skype_utils.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index f4fbc8486e..a998eda174 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -1,5 +1,5 @@
-#include "skype_proto.h"
-
+#include "skype_proto.h"
+
LanguagesListEntry CSkypeProto::languages[] =
{
{"Abkhazian", "ab"},
@@ -222,15 +222,15 @@ LanguagesListEntry CSkypeProto::languages[] =
{"Zhuang", "za"},
{"Zulu", "zu"}
};
-
-
-void CSkypeProto::FakeAsync(void *param)
-{
+
+
+void CSkypeProto::FakeAsync(void *param)
+{
::Sleep(100);
::CallService(MS_PROTO_BROADCASTACK, 0, (LPARAM)param);
- ::mir_free(param);
-}
-
+ ::mir_free(param);
+}
+
int CSkypeProto::DetectAvatarFormatBuffer(const char *pBuffer)
{
if (!strncmp(pBuffer, "%PNG", 4))
@@ -249,8 +249,8 @@ int CSkypeProto::DetectAvatarFormatBuffer(const char *pBuffer)
return PA_FORMAT_BMP;
return PA_FORMAT_UNKNOWN;
-}
-
+}
+
int CSkypeProto::DetectAvatarFormat(const wchar_t *path)
{
int src = _wopen(path, _O_BINARY | _O_RDONLY, 0);
@@ -262,8 +262,8 @@ int CSkypeProto::DetectAvatarFormat(const wchar_t *path)
_close(src);
return CSkypeProto::DetectAvatarFormatBuffer(pBuf);
-}
-
+}
+
wchar_t* CSkypeProto::GetContactAvatarFilePath(HANDLE hContact)
{
wchar_t* path = new wchar_t[MAX_PATH * 2];
@@ -299,18 +299,18 @@ wchar_t* CSkypeProto::GetContactAvatarFilePath(HANDLE hContact)
// make sure the avatar cache directory exists
::CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)path);
- wchar_t *sid = this->GetSettingString("sid");
+ wchar_t *sid = this->GetSettingString("sid", ::mir_wstrdup(L""));
::wcscat(path, sid);
::wcscat(path, L".jpg");
::mir_free(sid);
- return path;
-}
-
+ return path;
+}
+
int CSkypeProto::CompareProtos(const CSkypeProto *p1, const CSkypeProto *p2)
{
return wcscmp(p1->m_tszUserName, p2->m_tszUserName);
-}
+}
void CSkypeProto::CreateService(const char* szService, SkypeServiceFunc serviceProc)
{