Commit fc194f82 authored by Aurindam Jana's avatar Aurindam Jana Committed by Kai Koehne

Valgrind: Fix IP port detection

Listen on either IPv4 or IPv6 localhost but not both.

Change-Id: I0fcec59fa1c21346582343ad30a9448e3ee9440f
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 253a8522
......@@ -78,8 +78,10 @@ Analyzer::AnalyzerStartParameters ValgrindTool::createStartParameters(
ProjectExplorer::DeviceKitInformation::device(runConfiguration->target()->kit());
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return sp);
QTcpServer server;
if (!server.listen(QHostAddress::LocalHost) || !server.listen(QHostAddress::LocalHostIPv6))
if (!server.listen(QHostAddress::LocalHost) && !server.listen(QHostAddress::LocalHostIPv6)) {
qWarning() << "Cannot open port on host for profiling.";
return sp;
}
sp.connParams.host = server.serverAddress().toString();
sp.connParams.port = server.serverPort();
sp.startMode = Analyzer::StartLocal;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment