summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Skype/src/skype.cpp2
-rw-r--r--protocols/Skype/src/skype_profile.cpp42
-rw-r--r--protocols/Skype/src/skype_services.cpp1
3 files changed, 21 insertions, 24 deletions
diff --git a/protocols/Skype/src/skype.cpp b/protocols/Skype/src/skype.cpp
index 915a178276..7c19a055aa 100644
--- a/protocols/Skype/src/skype.cpp
+++ b/protocols/Skype/src/skype.cpp
@@ -333,7 +333,7 @@ int StartSkypeRuntime()
}
CloseHandle(snapshot);
- mir_sntprintf(param, SIZEOF(param), L"-p -m -f nodb -p %d", port);
+ mir_sntprintf(param, SIZEOF(param), L"-p -P %d", port);
int startingrt = CreateProcess(szFilename, param, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &cif, &pi);
return startingrt;
diff --git a/protocols/Skype/src/skype_profile.cpp b/protocols/Skype/src/skype_profile.cpp
index a5854ab9ff..eede0e216e 100644
--- a/protocols/Skype/src/skype_profile.cpp
+++ b/protocols/Skype/src/skype_profile.cpp
@@ -2,36 +2,32 @@
void CSkypeProto::UpdateOwnAvatar()
{
- /*uint newTS = 0;
+ uint newTS = 0;
this->account->GetPropAvatarTimestamp(newTS);
DWORD oldTS = this->GetSettingDword("AvatarTS");
- if (newTS > oldTS)
+ wchar_t *path = this->GetContactAvatarFilePath(NULL);
+ SEBinary data;
+ this->account->GetPropAvatarImage(data);
+ if ((newTS > oldTS) || (!newTS && data.size() > 0 && _waccess(path, 0) == -1) || (newTS && _waccess(path, 0) == -1)) //hack for avatars without timestamp
{
- SEBinary data;
- this->account->GetPropAvatarImage(data);
-
- if (data.size() > 0)
+ FILE* fp = _wfopen(path, L"wb");
+ if (fp)
{
- wchar_t *path = this->GetContactAvatarFilePath(NULL);
- FILE* fp = _wfopen(path, L"wb");
- if (fp)
- {
- fwrite(data.data(), sizeof(char), data.size(), fp);
- fclose(fp);
+ fwrite(data.data(), sizeof(char), data.size(), fp);
+ fclose(fp);
- this->SetSettingDword("AvatarTS", newTS);
+ this->SetSettingDword("AvatarTS", newTS);
- PROTO_AVATAR_INFORMATIONW pai = {0};
- pai.cbSize = sizeof(pai);
- pai.format = PA_FORMAT_JPEG;
- pai.hContact = NULL;
- wcscpy(pai.filename, path);
+ PROTO_AVATAR_INFORMATIONW pai = {0};
+ pai.cbSize = sizeof(pai);
+ pai.format = PA_FORMAT_JPEG;
+ pai.hContact = NULL;
+ wcscpy(pai.filename, path);
- this->SendBroadcast(ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
- }
- delete path;
- }
- }*/
+ this->SendBroadcast(ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
+ }
+ delete path;
+ }
}
void CSkypeProto::UpdateOwnBirthday()
diff --git a/protocols/Skype/src/skype_services.cpp b/protocols/Skype/src/skype_services.cpp
index 09aa2f29f2..591a1d862b 100644
--- a/protocols/Skype/src/skype_services.cpp
+++ b/protocols/Skype/src/skype_services.cpp
@@ -113,6 +113,7 @@ int __cdecl CSkypeProto::SetMyAvatar(WPARAM, LPARAM lParam)
this->Log("Failed to copy our avatar to local storage.");
return iRet;
}
+ //this->account->SetBinProperty(Account::P_AVATAR_IMAGE, avt);
// todo: add avatar loading to skype server