Update SSDPDiscover, Nanoleaf Device & CrossCompile Instructions (#616)

* Handle Exceptions in main & Pythoninit

* Have SSDPDiscover generic again

* Have SSDPDiscover generic again

* Change Info- to Debug logs as technical service messages

* Nanoleaf - When switched on, ensure UDP mode

* Include SQL Database in Cross-Compile instructions

* Fix Clazy (QT code checker) and clang Warnings
This commit is contained in:
LordGrey
2019-09-14 22:54:41 +02:00
committed by Paulchen Panther
parent 3173c9f7e3
commit b459b8723e
4 changed files with 91 additions and 92 deletions

View File

@@ -36,7 +36,7 @@ void SSDPDiscover::searchForService(const QString& st)
const QString SSDPDiscover::getFirstService(const searchType& type, const QString& st, const int& timeout_ms)
{
Info(_log, "Search for Hyperion server");
Debug(_log, "Search for Service [%s]", QSTRING_CSTR(st));
_searchTarget = st;
// search
@@ -88,10 +88,10 @@ const QString SSDPDiscover::getFirstService(const searchType& type, const QStrin
{
_usnList << headers.value("usn");
QUrl url(headers.value("location"));
//Info(_log, "Received msearch response from '%s:%d'. Search target: %s",QSTRING_CSTR(sender.toString()), senderPort, QSTRING_CSTR(headers.value("st")));
//Debug(_log, "Received msearch response from '%s:%d'. Search target: %s",QSTRING_CSTR(sender.toString()), senderPort, QSTRING_CSTR(headers.value("st")));
if(type == STY_WEBSERVER)
{
Info(_log, "Found service at: %s:%d", QSTRING_CSTR(url.host()), url.port());
Debug(_log, "Found service [%s] at: %s:%d", QSTRING_CSTR(st), QSTRING_CSTR(url.host()), url.port());
return url.host()+":"+QString::number(url.port());
}
@@ -104,7 +104,7 @@ const QString SSDPDiscover::getFirstService(const searchType& type, const QStrin
}
else
{
Info(_log, "Found service at: %s:%s", QSTRING_CSTR(url.host()), QSTRING_CSTR(fbsport));
Debug(_log, "Found service [%s] at: %s:%s", QSTRING_CSTR(st), QSTRING_CSTR(url.host()), QSTRING_CSTR(fbsport));
return url.host()+":"+fbsport;
}
}
@@ -117,13 +117,13 @@ const QString SSDPDiscover::getFirstService(const searchType& type, const QStrin
}
else
{
Info(_log, "Found service at: %s:%s", QSTRING_CSTR(url.host()), QSTRING_CSTR(jssport));
Debug(_log, "Found service at: %s:%s", QSTRING_CSTR(url.host()), QSTRING_CSTR(jssport));
return url.host()+":"+jssport;
}
}
}
}
Info(_log,"Search timeout, service [%s] not found", QSTRING_CSTR(st) );
Debug(_log,"Search timeout, service [%s] not found", QSTRING_CSTR(st) );
return QString();
}
@@ -168,7 +168,7 @@ void SSDPDiscover::readPendingDatagrams()
if (headers.value("st") == _searchTarget)
{
_usnList << headers.value("usn");
//Info(_log, "Received msearch response from '%s:%d'. Search target: %s",QSTRING_CSTR(sender.toString()), senderPort, QSTRING_CSTR(headers.value("st")));
//Debug(_log, "Received msearch response from '%s:%d'. Search target: %s",QSTRING_CSTR(sender.toString()), senderPort, QSTRING_CSTR(headers.value("st")));
QUrl url(headers.value("location"));
emit newService(url.host()+":"+QString::number(url.port()));
}