Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

QxtSslConnectionManager: move implementation of incomingConnection

  • Loading branch information...
commit 5fa776d3200a08539c2e33c8c9f709054a3944c4 1 parent 8789110
ahigerd authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/network/qxtsslconnectionmanager.cpp
View
12 src/network/qxtsslconnectionmanager.cpp
@@ -99,8 +99,16 @@ bool QxtSslConnectionManager::autoEncrypt() const
QIODevice* QxtSslConnectionManager::incomingConnection(int socketDescriptor)
{
- qxt_d().incomingConnection(socketDescriptor);
- return qxt_d().nextPendingConnection();
+ QSslSocket* socket = new QSslSocket(this);
+ if(socket->setSocketDescriptor(socketDescriptor)) {
+ socket->setLocalCertificate(qxt_d().localCertificate());
+ socket->setPrivateKey(qxt_d().privateKey());
+ if(qxt_d().autoEncrypt()) socket->startServerEncryption();
+ return socket;
+ } else {
+ delete socket;
+ return 0;
+ }
}
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.