summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_account.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_account.cpp')
-rw-r--r--protocols/Skype/src/skype_account.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_account.cpp b/protocols/Skype/src/skype_account.cpp
index 3bbf06bab3..6453e5e166 100644
--- a/protocols/Skype/src/skype_account.cpp
+++ b/protocols/Skype/src/skype_account.cpp
@@ -159,4 +159,25 @@ bool CSkypeProto::SignIn(int status)
}
return false;
+}
+
+bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar)
+{
+ bool result = false;
+
+ ::mir_md5_byte_t digest[16];
+ ::mir_md5_hash((PBYTE)avatar.data(), avatar.size(), digest);
+
+ DBVARIANT dbv;
+ ::db_get(NULL, this->m_szModuleName, "AvatarHash", &dbv);
+ if (dbv.type == DBVT_BLOB && dbv.pbVal && dbv.cpbVal == 16)
+ {
+ if (::memcmp(digest, dbv.pbVal, 16) == 0)
+ {
+ result = true;
+ }
+ }
+ ::db_free(&dbv);
+
+ return result;
} \ No newline at end of file