From f84f8085c240ef6991a953bc788a03c8fd86de32 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 24 Oct 2021 17:12:37 +0300 Subject: fixes #2966 (Jabber: hash calculation doesn't include OS version, thus giving wrong client OS version) --- protocols/JabberG/src/jabber_caps.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'protocols/JabberG/src') 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))); -- cgit v1.2.3