diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-10-15 18:58:11 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-10-15 18:58:21 +0200 |
commit | a1ff2d63157dcfececfa14f49b355a9a22d525cb (patch) | |
tree | db8efb17304610e2dec150e9b7523c4075b77230 /kopete | |
parent | f94fdac5294c571ec83faf89949159cdb609fbd6 (diff) | |
download | tdenetwork-a1ff2d63157dcfececfa14f49b355a9a22d525cb.tar.gz tdenetwork-a1ff2d63157dcfececfa14f49b355a9a22d525cb.zip |
Kopete - jabber: Not force old XMPP protocol
This resolves bug 698
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 2a0baddda5436cb80d40c5166be42a6c84b90ab3)
Diffstat (limited to 'kopete')
-rw-r--r-- | kopete/protocols/jabber/jabberaccount.cpp | 12 | ||||
-rw-r--r-- | kopete/protocols/jabber/tdeioslave/jabberdisco.cpp | 12 | ||||
-rw-r--r-- | kopete/protocols/jabber/ui/jabberregisteraccount.cpp | 13 |
3 files changed, 24 insertions, 13 deletions
diff --git a/kopete/protocols/jabber/jabberaccount.cpp b/kopete/protocols/jabber/jabberaccount.cpp index 06ec2279..4cc2c866 100644 --- a/kopete/protocols/jabber/jabberaccount.cpp +++ b/kopete/protocols/jabber/jabberaccount.cpp @@ -335,14 +335,18 @@ void JabberAccount::connectWithPassword ( const TQString &password ) m_jabberClient->disconnect (); } - // we need to use the old protocol for now - m_jabberClient->setUseXMPP09 ( true ); - // set SSL flag (this should be converted to forceTLS when using the new protocol) m_jabberClient->setUseSSL ( configGroup()->readBoolEntry ( "UseSSL", false ) ); // override server and port (this should be dropped when using the new protocol and no direct SSL) - m_jabberClient->setOverrideHost ( true, server (), port () ); + if( configGroup()->readBoolEntry ( "CustomServer", false ) ) { + m_jabberClient->setUseXMPP09 ( true ); + m_jabberClient->setOverrideHost ( true, server (), port () ); + } + else { + m_jabberClient->setUseXMPP09 ( false ); + m_jabberClient->setOverrideHost ( false ); + } // allow plaintext password authentication or not? m_jabberClient->setAllowPlainTextPassword ( configGroup()->readBoolEntry ( "AllowPlainTextPassword", false ) ); diff --git a/kopete/protocols/jabber/tdeioslave/jabberdisco.cpp b/kopete/protocols/jabber/tdeioslave/jabberdisco.cpp index c3091248..470a9f2e 100644 --- a/kopete/protocols/jabber/tdeioslave/jabberdisco.cpp +++ b/kopete/protocols/jabber/tdeioslave/jabberdisco.cpp @@ -90,14 +90,18 @@ void JabberDiscoProtocol::openConnection () m_jabberClient->disconnect (); } - // we need to use the old protocol for now - m_jabberClient->setUseXMPP09 ( true ); - // set SSL flag (this should be converted to forceTLS when using the new protocol) m_jabberClient->setUseSSL ( false ); // override server and port (this should be dropped when using the new protocol and no direct SSL) - m_jabberClient->setOverrideHost ( true, m_host, m_port ); + if( !m_host.isEmpty() ) { + m_jabberClient->setUseXMPP09 ( true ); + m_jabberClient->setOverrideHost ( true, m_host, m_port ); + } + else { + m_jabberClient->setUseXMPP09 ( false ); + m_jabberClient->setOverrideHost ( false ); + } // allow plaintext password authentication or not? m_jabberClient->setAllowPlainTextPassword ( false ); diff --git a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp index febad40c..f3d01c76 100644 --- a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp +++ b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp @@ -250,13 +250,16 @@ void JabberRegisterAccount::slotOk () // cancel any previous attempt jabberClient->disconnect (); - // FIXME: we need to use the old protocol for now - jabberClient->setUseXMPP09 ( true ); - jabberClient->setUseSSL ( mMainWidget->cbUseSSL->isChecked () ); - // FIXME: check this when using the new protocol - jabberClient->setOverrideHost ( true, mMainWidget->leServer->text (), mMainWidget->sbPort->value () ); + if( !mMainWidget->leServer->text().isEmpty() ) { + jabberClient->setUseXMPP09 ( true ); + jabberClient->setOverrideHost ( true, mMainWidget->leServer->text (), mMainWidget->sbPort->value () ); + } + else { + jabberClient->setUseXMPP09 ( false ); + jabberClient->setOverrideHost ( false ); + } // start connection, no authentication switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), TQString(), false ) ) |