Version: 0.10.93 (branches/KDE/3.5) (using KDE KDE 3.4.3) Installed from: Compiled From Sources Compiler: gcc 4.0.3 20051006 (prerelease) The server requires that SSL is enabled but I didn't have it enabled. When connecting, kopete says: "There was an error in the protocol stream: Policy violation in the protocol stream." However the server did send something more useful and perhaps it should be shown to the user: kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <iq type="get" id="auth_1" to="unstable.nl" > <query xmlns="jabber:iq:auth"> <username>my_user_name</username> </query> </iq> kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML IN: <stream:error> <policy-violation xmlns="urn:ietf:params:xml:ns:xmpp-streams"/> <text xmlns="urn:ietf:params:xml:ns:xmpp-streams" xml:lang="" >Use of STARTTLS required</text> </stream:error>
SVN commit 570123 by rantala: If we get a human readable error message from the stream, show it to the user in a detailedError msgbox. Libiris can parse the message from servers that return <stream:error/>. A notable exception is google talk. BUG: 114769 M +15 -8 jabberaccount.cpp M +1 -1 jabberaccount.h M +1 -1 ui/jabberregisteraccount.cpp --- trunk/KDE/kdenetwork/kopete/protocols/jabber/jabberaccount.cpp #570122:570123 @@ -774,7 +774,7 @@ } -void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass) +void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass, QString additionalErrMsg) { QString errorText; QString errorCondition; @@ -801,7 +801,7 @@ switch(streamCondition) { case XMPP::Stream::GenericStreamError: - errorCondition = i18n("Generic stream error (sorry, I do not have a more-detailed reason)"); + errorCondition = i18n("Generic stream error."); break; case XMPP::Stream::Conflict: // FIXME: need a better error message here @@ -1027,12 +1027,19 @@ * API will attempt to reconnect, queueing another * error until memory is exhausted. */ - if(!errorText.isEmpty()) - KMessageBox::error (Kopete::UI::Global::mainWidget (), - errorText, - i18n("Connection problem with Jabber server %1", server)); + if(!errorText.isEmpty()) { + if (!additionalErrMsg.isEmpty()) { + KMessageBox::detailedError (Kopete::UI::Global::mainWidget (), + errorText, + additionalErrMsg, + i18n("Connection problem with Jabber server %1", server)); + } else { + KMessageBox::error (Kopete::UI::Global::mainWidget (), + errorText, + i18n("Connection problem with Jabber server %1", server)); + } + } - } void JabberAccount::slotCSError ( int error ) @@ -1053,7 +1060,7 @@ // display message to user if(!m_removing) //when removing the account, connection errors are normal. - handleStreamError (error, client()->clientStream()->errorCondition (), client()->clientConnector()->errorCode (), server (), errorClass); + handleStreamError (error, client()->clientStream()->errorCondition (), client()->clientConnector()->errorCode (), server (), errorClass, client()->clientStream()->errorText()); disconnect ( errorClass ); --- trunk/KDE/kdenetwork/kopete/protocols/jabber/jabberaccount.h #570122:570123 @@ -132,7 +132,7 @@ /* * Handle stream errors. Displays a dialog and returns. */ - static void handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass); + static void handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass, QString additionalErrMsg); const QMap<QString, JabberTransport *> &transports() { return m_transports; } --- trunk/KDE/kdenetwork/kopete/protocols/jabber/ui/jabberregisteraccount.cpp #570122:570123 @@ -322,7 +322,7 @@ mMainWidget->lblStatusMessage->setText ( i18n ( "Protocol error." ) ); // display message to user - JabberAccount::handleStreamError (error, jabberClient->clientStream()->errorCondition (), jabberClient->clientConnector()->errorCode (), mMainWidget->leServer->text (), errorClass); + JabberAccount::handleStreamError (error, jabberClient->clientStream()->errorCondition (), jabberClient->clientConnector()->errorCode (), mMainWidget->leServer->text (), errorClass, jabberClient->clientStream()->errorText()); disconnect ();