diff options
author | George Hazan <ghazan@miranda.im> | 2021-10-24 17:12:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-10-24 17:12:57 +0300 |
commit | f84f8085c240ef6991a953bc788a03c8fd86de32 (patch) | |
tree | 8b27c908b9ae473cd902892f4f95a2dbb0819d15 /protocols/JabberG/src/jabber_caps.cpp | |
parent | bc2bf7670c35c658360629ce212963f0a8a1ac75 (diff) |
fixes #2966 (Jabber: hash calculation doesn't include OS version, thus giving wrong client OS version)
Diffstat (limited to 'protocols/JabberG/src/jabber_caps.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_caps.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index 1160dc9d49..ec64e4a83e 100755 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -450,6 +450,12 @@ void CJabberProto::UpdateFeatHash() feat_buf.Append("x-miranda-core-version"); feat_buf.AppendChar('<');
feat_buf.Append(szCoreVersion); feat_buf.AppendChar('<');
+ char os[256];
+ if (!OS_GetDisplayString(os, _countof(os))) {
+ feat_buf.Append("x-miranda-os-version"); feat_buf.AppendChar('<');
+ feat_buf.Append(os); feat_buf.AppendChar('<');
+ }
+
BYTE hash[MIR_SHA1_HASH_SIZE];
mir_sha1_hash((BYTE *)feat_buf.c_str(), feat_buf.GetLength(), hash);
ptrA szHash(mir_base64_encode(&hash, sizeof(hash)));
|