From 057d4f28bd4939b2afa2d40de91d6397dd23cf7c Mon Sep 17 00:00:00 2001 From: ishmal Date: Tue, 29 Aug 2006 00:36:17 +0000 Subject: [PATCH] better handle startTls() if client not built with ssl --- src/pedro/pedroutil.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/pedro/pedroutil.cpp b/src/pedro/pedroutil.cpp index 36180c556..6d988c719 100644 --- a/src/pedro/pedroutil.cpp +++ b/src/pedro/pedroutil.cpp @@ -880,13 +880,6 @@ TcpSocket::TcpSocket() } -TcpSocket::TcpSocket(const char *hostnameArg, int port) -{ - init(); - hostname = hostnameArg; - portno = port; -} - TcpSocket::TcpSocket(const std::string &hostnameArg, int port) { init(); @@ -1023,6 +1016,15 @@ bool TcpSocket::isConnected() return true; } +bool TcpSocket::getHaveSSL() +{ +#ifdef HAVE_SSL + return true; +#else + return false; +#endif +} + void TcpSocket::enableSSL(bool val) { sslEnabled = val; @@ -1034,12 +1036,6 @@ bool TcpSocket::getEnableSSL() } -bool TcpSocket::connect(const char *hostnameArg, int portnoArg) -{ - hostname = hostnameArg; - portno = portnoArg; - return connect(); -} bool TcpSocket::connect(const std::string &hostnameArg, int portnoArg) { -- 2.30.2