From e1f73541ce8bb231fb2deb90e56dd7a89b1ff1fc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 2 Dec 2024 19:50:18 +0300 Subject: code reorganizing & cleaning --- protocols/JabberG/src/jabber_proto.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'protocols/JabberG/src/jabber_proto.cpp') diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index fbb772ac56..0ec19dfc69 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -27,7 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "jabber_iq.h" #include "jabber_caps.h" #include "jabber_disco.h" -#include "jabber_secur.h" #pragma warning(disable:4355) @@ -53,12 +52,18 @@ static int compareListItems(const JABBER_LIST_ITEM *p1, const JABBER_LIST_ITEM * return mir_strcmpi(szp1, szp2); } +static int compareAuth(const TJabberAuth *p1, const TJabberAuth *p2) +{ + return p2->getPriority() - p1->getPriority(); // reverse sorting order +} + CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) : PROTO(aProtoName, aUserName), m_impl(*this), m_omemo(this), m_arChatMarks(50, NumericKeySortT), - m_arAuthMechs(1, &TJabberAuth::compare), + m_arAuthMechs(1, compareAuth), + m_arSaslUpgrade(1, compareAuth), m_lstTransports(50, compareTransports), m_lstRoster(50, compareListItems), m_iqManager(this), -- cgit v1.2.3