mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
fix(ssdp): ssdp:all provide better feedback (#720)
* fix: ssdp:all provide a better feedback * Add more debug statements to webserver
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include <QNetworkInterface>
|
||||
#include <QNetworkConfigurationManager>
|
||||
|
||||
static const QString SSDP_HYPERION_ST("urn:hyperion-project.org:device:basic:1");
|
||||
|
||||
SSDPHandler::SSDPHandler(WebServer* webserver, const quint16& flatBufPort, const quint16& jsonServerPort, const QString& name, QObject * parent)
|
||||
: SSDPServer(parent)
|
||||
, _webserver(webserver)
|
||||
@@ -33,7 +35,7 @@ void SSDPHandler::initServer()
|
||||
// announce targets
|
||||
_deviceList.push_back("upnp:rootdevice");
|
||||
_deviceList.push_back("uuid:"+_uuid);
|
||||
_deviceList.push_back("urn:hyperion-project.org:device:basic:1");
|
||||
_deviceList.push_back(SSDP_HYPERION_ST);
|
||||
|
||||
// prep server
|
||||
SSDPServer::initServer();
|
||||
@@ -145,7 +147,9 @@ void SSDPHandler::handleMSearchRequest(const QString& target, const QString& mx,
|
||||
// TODO Response delay according to MX field (sec) random between 0 and MX
|
||||
|
||||
// when searched for all devices / root devices / basic device
|
||||
if(target == "ssdp:all" || target == "upnp:rootdevice" || target == "urn:schemas-upnp-org:device:basic:1" || target == "urn:hyperion-project.org:device:basic:1")
|
||||
if(target == "ssdp:all")
|
||||
sendMSearchResponse(SSDP_HYPERION_ST, address, port);
|
||||
else if(target == "upnp:rootdevice" || target == "urn:schemas-upnp-org:device:basic:1" || target == SSDP_HYPERION_ST)
|
||||
sendMSearchResponse(target, address, port);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user