remove temporary fix for mdns lookup
This commit is contained in:
2026-08-20 13:27:10 +02:00
parent cd1335c35c
commit 51831efdfa
-24
View File
@@ -74,30 +74,6 @@ int main(int argc, char *argv[])
{ {
url = QUrl::fromUserInput(parser.value(debug_option)); url = QUrl::fromUserInput(parser.value(debug_option));
url.setScheme("ws"); url.setScheme("ws");
#if defined(__linux__)
if (url.host().endsWith(".local"))
{
QProcess p;
p.start("avahi-resolve", {"-4", "--name", url.host()});
p.waitForFinished(-1);
QString stdout = p.readAllStandardOutput();
QString stderr = p.readAllStandardError();
if (!stderr.isEmpty())
{
SPDLOG_CRITICAL("Unable to resolve {}", parser.value(host_option).toStdString());
return -1;
}
auto ret = stdout.split(u'\t', Qt::SkipEmptyParts);
if (ret.count() < 2)
{
SPDLOG_CRITICAL("Unable to resolve {}: not enough paramteters", parser.value(host_option).toStdString());
}
ret[1].removeLast();
url.setHost(ret[1]);
}
#endif
} else } else
{ {
url.setPath("/ws"); url.setPath("/ws");