summaryrefslogtreecommitdiff
path: root/client/SslClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/SslClient.cpp')
-rw-r--r--client/SslClient.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/client/SslClient.cpp b/client/SslClient.cpp
index fff44ea..70d32a7 100644
--- a/client/SslClient.cpp
+++ b/client/SslClient.cpp
@@ -1,7 +1,6 @@
#include <QtCore>
#include <QtNetwork>
-#include "client.h"
#include "SslClient.h"
SslClient::SslClient(): port(13666)
@@ -9,6 +8,11 @@ SslClient::SslClient(): port(13666)
SslClient((char*)"127.0.0.1");
}
+SslClient::SslClient(string &addr): port(13666)
+{
+ SslClient((char*)addr.c_str());
+}
+
SslClient::SslClient(char* addr): port(13666)
{
server = addr;
@@ -52,7 +56,7 @@ SslClient::SslClient(char* addr): port(13666)
connect(sslSocket, SIGNAL(error(QAbstractSocket::SocketError)),
this, SLOT(Error(QAbstractSocket::SocketError)));
connect(sslSocket, SIGNAL(peerVerifyError(const QSslError &)),
- this, SLOT(PeerVerifyError(const QsslError)));
+ this, SLOT(PeerVerifyError(const QSslError)));
connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError> &)),
this, SLOT(SslErrors(const QList<QSslError> &)));
}
@@ -64,7 +68,7 @@ void SslClient::SetServerAddr(char* addr)
void SslClient::SendRequest(RequestType type)
{
- if (sslSocket->state() == QAbstractSocket::ConnectedState)
+ if (sslSocket->state() != QAbstractSocket::ConnectedState)
sslSocket->connectToHostEncrypted(server, port);
unsigned char rcode = 0x00;