Improve debug information
If we're ignoring an ssl issue, at least show it. On connected show whether the socket is valid, otherwise we get remote devices disconnected without any message. (In this case HostNameMismatch) Also fixes a typo CCBUG: 381542
This commit is contained in:
parent
a4c0a8fb96
commit
29888cb78b
2 changed files with 4 additions and 3 deletions
|
@ -230,9 +230,9 @@ void LanLinkProvider::connectError()
|
|||
//We received a UDP package and answered by connecting to them by TCP. This gets called on a succesful connection.
|
||||
void LanLinkProvider::connected()
|
||||
{
|
||||
qCDebug(KDECONNECT_CORE) << "Socket connected";
|
||||
|
||||
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
||||
qCDebug(KDECONNECT_CORE) << "Socket connected" << socket;
|
||||
|
||||
if (!socket) return;
|
||||
disconnect(socket, &QAbstractSocket::connected, this, &LanLinkProvider::connected);
|
||||
disconnect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(connectError()));
|
||||
|
@ -334,6 +334,7 @@ void LanLinkProvider::sslErrors(const QList<QSslError>& errors)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
qCDebug(KDECONNECT_CORE) << "Ignoring ssl issue:" << int(error.error()) << error.errorString();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ void Server::incomingConnection(qintptr socketDescriptor) {
|
|||
}
|
||||
|
||||
QSslSocket* Server::nextPendingConnection() {
|
||||
qDebug() << "nextPendingConnection (emtpy:" << pendingConnections.isEmpty() << ")";
|
||||
qDebug() << "nextPendingConnection (pending:" << pendingConnections.count() << ")";
|
||||
if (pendingConnections.isEmpty()) {
|
||||
return Q_NULLPTR;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue