From c4c5cfe83ceff86ba006bdea1def01827b6cc73f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Jun 2022 16:48:17 +0300 Subject: Jabber: unused setting removed --- protocols/JabberG/src/jabber_ft.cpp | 12 ++++++------ protocols/JabberG/src/jabber_iq_handlers.cpp | 2 +- protocols/JabberG/src/jabber_opt.cpp | 1 - protocols/JabberG/src/jabber_proto.cpp | 1 - protocols/JabberG/src/jabber_proto.h | 1 - 5 files changed, 7 insertions(+), 10 deletions(-) (limited to 'protocols/JabberG') diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index 0a34799fcb..0437824f2d 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -175,10 +175,10 @@ void CJabberProto::FtInitiate(filetransfer *ft) jcb = GetResourceCapabilities(ft->pItem->jid); } - // fix for very smart clients, like gajim - if (!m_bBsDirect && !m_bBsProxyManual) { - // disable bytestreams - jcb &= ~JABBER_CAPS_BYTESTREAMS; + if (!m_bBsDirect) { + jcb &= ~JABBER_CAPS_OOB; + if(!m_bBsProxyManual) // disable bytestreams + jcb &= ~JABBER_CAPS_BYTESTREAMS; } // if only JABBER_CAPS_SI_FT feature set (without BS or IBB), disable JABBER_CAPS_SI_FT @@ -415,7 +415,7 @@ void CJabberProto::FtHandleSiRequest(const TiXmlElement *iqNode) (xNode = XmlGetChildByTag(featureNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS)) != nullptr && (fieldNode = XmlGetChildByTag(xNode, "field", "var", "stream-method")) != nullptr) { - BOOL bIbbOnly = m_bBsOnlyIBB; + BOOL bIbbOnly = !m_bBsDirect; const TiXmlElement *optionNode = nullptr; JABBER_FT_TYPE ftType = FT_OOB; @@ -515,7 +515,7 @@ bool CJabberProto::FtHandleBytestreamRequest(const TiXmlElement *iqNode, CJabber const char *sid = XmlGetAttr(queryNode, "sid"); JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_FTRECV, sid); - if (sid && item) { + if (sid && item && m_bBsDirect) { // Start Bytestream session JABBER_BYTE_TRANSFER *jbt = new JABBER_BYTE_TRANSFER; jbt->iqNode = iqNode->DeepClone(&jbt->doc)->ToElement(); diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 6c02b89986..5498a1068a 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -270,7 +270,7 @@ bool CJabberProto::OnIqRequestOOB(const TiXmlElement*, CJabberIqInfo *pInfo) if (!pszUrl) return true; - if (m_bBsOnlyIBB) { + if (!m_bBsDirect) { // reject XmlNodeIq iq("error", pInfo); TiXmlElement *e = XmlAddChildA(iq, "error", "File transfer refused"); e->SetAttribute("code", 406); diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 361ca9e073..0369a8c987 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -727,7 +727,6 @@ public: m_options.AddOption(LPGENW("Security"), LPGENW("Allow local time and timezone requests (XEP-0202)"), m_proto->m_bAllowTimeReplies); m_options.AddOption(LPGENW("Security"), LPGENW("Allow servers to request version (XEP-0092)"), m_proto->m_bAllowVersionRequests); m_options.AddOption(LPGENW("Security"), LPGENW("Show information about operating system in version replies"), m_proto->m_bShowOSVersion); - m_options.AddOption(LPGENW("Security"), LPGENW("Accept only in band incoming filetransfers (don't disclose own IP)"), m_proto->m_bBsOnlyIBB); m_options.AddOption(LPGENW("Security"), LPGENW("Accept HTTP Authentication requests (XEP-0070)"), m_proto->m_bAcceptHttpAuth); m_options.AddOption(LPGENW("Security"), LPGENW("Use OMEMO encryption for messages if possible (XEP-0384) (Basic support without GUI)"), m_proto->m_bUseOMEMO); } diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 6b17777e13..35c7de8ad4 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -89,7 +89,6 @@ CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) : m_bAutosaveNotes(this, "AutosaveNotes", false), m_bBsDirect(this, "BsDirect", true), m_bBsDirectManual(this, "BsDirectManual", false), - m_bBsOnlyIBB(this, "BsOnlyIBB", false), m_bBsProxyManual(this, "BsProxyManual", false), m_bDisable3920auth(this, "Disable3920auth", false), m_bDisableFrame(this, "DisableFrame", true), diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index b6b0754d6e..72e29ceb74 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -191,7 +191,6 @@ struct CJabberProto : public PROTO, public IJabberInterface CMOption m_bAutosaveNotes; CMOption m_bBsDirect; CMOption m_bBsDirectManual; - CMOption m_bBsOnlyIBB; CMOption m_bBsProxyManual; CMOption m_bDisable3920auth; CMOption m_bDisableFrame; -- cgit v1.2.3