summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-06-21 16:48:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-06-21 16:48:17 +0300
commitc4c5cfe83ceff86ba006bdea1def01827b6cc73f (patch)
tree16a194fe44ccb0c75e6d884da65420cfb1fc5c08 /protocols/JabberG
parentf1e6512f2f24a9cde4beed2462a97aceca82832a (diff)
Jabber: unused setting removed
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_ft.cpp12
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp2
-rw-r--r--protocols/JabberG/src/jabber_opt.cpp1
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp1
-rw-r--r--protocols/JabberG/src/jabber_proto.h1
5 files changed, 7 insertions, 10 deletions
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<CJabberProto>, public IJabberInterface
CMOption<bool> m_bAutosaveNotes;
CMOption<bool> m_bBsDirect;
CMOption<bool> m_bBsDirectManual;
- CMOption<bool> m_bBsOnlyIBB;
CMOption<bool> m_bBsProxyManual;
CMOption<bool> m_bDisable3920auth;
CMOption<bool> m_bDisableFrame;