Code

better handle startTls() if client not built with ssl
authorishmal <ishmal@users.sourceforge.net>
Tue, 29 Aug 2006 00:36:17 +0000 (00:36 +0000)
committerishmal <ishmal@users.sourceforge.net>
Tue, 29 Aug 2006 00:36:17 +0000 (00:36 +0000)
src/pedro/pedroutil.cpp

index 36180c5565086560e53e0835d68ca1ff8e8205c7..6d988c719a7844a109e1e6033d3c21ad8d0f6af8 100644 (file)
@@ -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)
 {