From 1434818f7c7fff0c1258f44b14e925951fe2b66c Mon Sep 17 00:00:00 2001 From: Bob Jamison Date: Sun, 21 May 2006 21:14:09 +0000 Subject: Check if we are already SSL before trying STARTTLS (bzr r927) --- src/pedro/pedroxmpp.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pedro/pedroxmpp.cpp b/src/pedro/pedroxmpp.cpp index f447b9356..6bce6c10e 100644 --- a/src/pedro/pedroxmpp.cpp +++ b/src/pedro/pedroxmpp.cpp @@ -1146,6 +1146,8 @@ public: void enableSSL(bool val); + bool getEnableSSL(); + bool connect(const std::string &hostname, int portno); bool connect(const char *hostname, int portno); @@ -1376,6 +1378,11 @@ void TcpSocket::enableSSL(bool val) sslEnabled = val; } +bool TcpSocket::getEnableSSL() +{ + return sslEnabled; +} + bool TcpSocket::connect(const char *hostnameArg, int portnoArg) { @@ -3477,7 +3484,7 @@ bool XmppClient::saslAuthenticate() status("login: STARTTLS available"); } - if (wantStartTls) + if (wantStartTls && !sock->getEnableSSL()) { delete elem; char *fmt = -- cgit v1.2.3