1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 13:47:01 -04:00

Fix API host address in About dialog and debug message

The API server is listening on all interfaces. This is indicated by Qt
with the address 0.0.0.0 even if it is listening on both IPv4 and IPv6
https://doc.qt.io/qt-6/qhostaddress.html#toString
So the following addresses are valid
 http://127.0.0.1:8091/
 http://[::1]:8091/
 http://0.0.0.0:8091/
 http://[::]:8091/
plus any other address assigned to wired, wireless or virtual interfaces.
This commit is contained in:
Daniele Forsi
2024-07-20 19:20:17 +02:00
parent 40f7ecdaa0
commit e46f7f09b8
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ void WebAPIServer::start()
if (!m_listener)
{
m_listener = new qtwebapp::HttpListener(m_settings, m_requestMapper, qApp);
qInfo("WebAPIServer::start: starting web API server at http://%s:%d", qPrintable(m_settings.host), m_settings.port);
qInfo("WebAPIServer::start: starting web API server at http://%s:%d", qPrintable(m_settings.host.isEmpty() ? "0.0.0.0" : m_settings.host), m_settings.port);
}
}
@@ -54,7 +54,7 @@ void WebAPIServer::stop()
{
delete m_listener;
m_listener = 0;
qInfo("WebAPIServer::stop: stopped web API server at http://%s:%d", qPrintable(m_settings.host), m_settings.port);
qInfo("WebAPIServer::stop: stopped web API server at http://%s:%d", qPrintable(m_settings.host.isEmpty() ? "0.0.0.0" : m_settings.host), m_settings.port);
}
}