QNativeSocketEngine: Add debug in createNewSocket.
If this fails, we want to know about it when trying to debug. Change-Id: I33f05186e93fcd9284a7e7c609d00fe7ac87cd4e Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
e9782fee8f
commit
83080e8a7c
@ -154,7 +154,8 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (socket <= 0) {
|
if (socket <= 0) {
|
||||||
switch (errno) {
|
int ecopy = errno;
|
||||||
|
switch (ecopy) {
|
||||||
case EPROTONOSUPPORT:
|
case EPROTONOSUPPORT:
|
||||||
case EAFNOSUPPORT:
|
case EAFNOSUPPORT:
|
||||||
case EINVAL:
|
case EINVAL:
|
||||||
@ -173,9 +174,20 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
||||||
|
qDebug("QNativeSocketEnginePrivate::createNewSocket(%d, %d) == false (%s)",
|
||||||
|
socketType, socketProtocol,
|
||||||
|
strerror(ecopy));
|
||||||
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
||||||
|
qDebug("QNativeSocketEnginePrivate::createNewSocket(%d, %d) == true",
|
||||||
|
socketType, socketProtocol);
|
||||||
|
#endif
|
||||||
|
|
||||||
socketDescriptor = socket;
|
socketDescriptor = socket;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user