From e8c7a91a247a09f4e4035641c697c9f51ba9f17c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 6 Jul 2023 15:59:51 +0300 Subject: Jabber: fix for Jingle options --- protocols/JabberG/src/jabber_opt.cpp | 2 +- protocols/JabberG/src/jabber_proto.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index b0bc6d6342..c49f75ba7a 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -707,7 +707,7 @@ public: m_options.AddOption(LPGENW("Messaging"), LPGENW("Enable carbon copies (XEP-0280)"), m_proto->m_bEnableCarbons); if (mir_strlen(ptrA(m_proto->getStringA("HttpUpload")))) m_options.AddOption(LPGENW("Messaging"), LPGENW("Enable HTTP File Upload (XEP-0363)"), m_proto->m_bUseHttpUpload); - if (m_proto->hasJingle()) + if (m_proto->FindFeature(JABBER_FEAT_JINGLE)) m_options.AddOption(LPGENW("Messaging"), LPGENW("Enable VOIP (experimental)"), m_proto->m_bEnableVOIP); m_options.AddOption(LPGENW("Server options"), LPGENW("Use Stream Management (XEP-0198) if possible (experimental)"), m_proto->m_bEnableStreamMgmt); diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index b5a882df24..10c6e87feb 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -422,7 +422,6 @@ struct CJabberProto : public PROTO, public IJabberInterface int ByteSendProxyParse(HNETLIBCONN hConn, JABBER_BYTE_TRANSFER *jbt, char* buffer, int datalen); //---- jabber_caps.cpp --------------------------------------------------------------- - OBJLIST m_lstJabberFeatCapPairsDynamic; // list of features registered through IJabberNetInterface::RegisterFeature() JabberCapsBits m_uEnabledFeatCapsDynamic; CMStringA m_szFeaturesCrc; @@ -438,6 +437,10 @@ struct CJabberProto : public PROTO, public IJabberInterface LIST GetSortedFeatStrings(JabberCapsBits jcb); JabberCapsBits GetOwnCaps(bool IncludeDynamic = true); + // dynamic list of features registered through IJabberNetInterface::RegisterFeature() + OBJLIST m_lstJabberFeatCapPairsDynamic; + JabberFeatCapPairDynamic *FindFeature(const char *szFeature); + //---- jabber_captcha.cpp ------------------------------------------------------------ void sendCaptchaResult(char* buf, ThreadData *info, const char *from, const char *challenge, const char *fromjid, const char *sid); @@ -968,8 +971,6 @@ private: int m_nMenuResourceItems; HGENMENU* m_phMenuResourceItems; - JabberFeatCapPairDynamic* FindFeature(const char *szFeature); - public: uint32_t STDMETHODCALLTYPE GetFlags() const override; // Set of JIF_* flags. int STDMETHODCALLTYPE GetVersion() const override; // Returns version of IJabberInterface. -- cgit v1.2.3