summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-10-24 17:12:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-10-24 17:12:57 +0300
commitf84f8085c240ef6991a953bc788a03c8fd86de32 (patch)
tree8b27c908b9ae473cd902892f4f95a2dbb0819d15 /protocols/JabberG
parentbc2bf7670c35c658360629ce212963f0a8a1ac75 (diff)
fixes #2966 (Jabber: hash calculation doesn't include OS version, thus giving wrong client OS version)
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-xprotocols/JabberG/src/jabber_caps.cpp6
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)));