From 81a24f5b251682d5f320c0907efcb047a22102c0 Mon Sep 17 00:00:00 2001 From: ishmal Date: Sun, 21 May 2006 21:14:09 +0000 Subject: [PATCH] Check if we are already SSL before trying STARTTLS --- 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 = -- 2.30.2