mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
client
remove temporary fix for mdns lookup
This commit is contained in:
@@ -74,30 +74,6 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
url = QUrl::fromUserInput(parser.value(debug_option));
|
||||
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
|
||||
{
|
||||
url.setPath("/ws");
|
||||
|
||||
Reference in New Issue
Block a user