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 2a0baddda5)
pull/38/head
Slávek Banko 8 years ago
parent f94fdac529
commit a1ff2d6315

@ -335,14 +335,18 @@ void JabberAccount::connectWithPassword ( const TQString &password )
m_jabberClient->disconnect (); 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) // set SSL flag (this should be converted to forceTLS when using the new protocol)
m_jabberClient->setUseSSL ( configGroup()->readBoolEntry ( "UseSSL", false ) ); m_jabberClient->setUseSSL ( configGroup()->readBoolEntry ( "UseSSL", false ) );
// override server and port (this should be dropped when using the new protocol and no direct SSL) // 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? // allow plaintext password authentication or not?
m_jabberClient->setAllowPlainTextPassword ( configGroup()->readBoolEntry ( "AllowPlainTextPassword", false ) ); m_jabberClient->setAllowPlainTextPassword ( configGroup()->readBoolEntry ( "AllowPlainTextPassword", false ) );

@ -90,14 +90,18 @@ void JabberDiscoProtocol::openConnection ()
m_jabberClient->disconnect (); 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) // set SSL flag (this should be converted to forceTLS when using the new protocol)
m_jabberClient->setUseSSL ( false ); m_jabberClient->setUseSSL ( false );
// override server and port (this should be dropped when using the new protocol and no direct SSL) // 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? // allow plaintext password authentication or not?
m_jabberClient->setAllowPlainTextPassword ( false ); m_jabberClient->setAllowPlainTextPassword ( false );

@ -250,13 +250,16 @@ void JabberRegisterAccount::slotOk ()
// cancel any previous attempt // cancel any previous attempt
jabberClient->disconnect (); jabberClient->disconnect ();
// FIXME: we need to use the old protocol for now
jabberClient->setUseXMPP09 ( true );
jabberClient->setUseSSL ( mMainWidget->cbUseSSL->isChecked () ); jabberClient->setUseSSL ( mMainWidget->cbUseSSL->isChecked () );
// FIXME: check this when using the new protocol if( !mMainWidget->leServer->text().isEmpty() ) {
jabberClient->setOverrideHost ( true, mMainWidget->leServer->text (), mMainWidget->sbPort->value () ); jabberClient->setUseXMPP09 ( true );
jabberClient->setOverrideHost ( true, mMainWidget->leServer->text (), mMainWidget->sbPort->value () );
}
else {
jabberClient->setUseXMPP09 ( false );
jabberClient->setOverrideHost ( false );
}
// start connection, no authentication // start connection, no authentication
switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), TQString(), false ) ) switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), TQString(), false ) )

Loading…
Cancel
Save