Fixing outstanding issues (#1537)

* Correct stopEnableAttemptsTimer thread affinity

* Restart correctly, if running as service

* Add instance# in API response

* Qt6 updates

* Update fallthrough guide

* Update Compile warning
This commit is contained in:
LordGrey
2022-12-19 14:04:35 +01:00
committed by GitHub
parent 10b755b2ec
commit 2217135336
9 changed files with 26 additions and 17 deletions

View File

@@ -990,7 +990,7 @@ void JsonAPI::handleConfigCommand(const QJsonObject &message, const QString &com
{
Debug(_log, "Restarting due to RPC command");
Process::restartHyperion();
Process::restartHyperion(10);
sendSuccessReply(command + "-" + subcommand, tan);
}
@@ -1425,7 +1425,7 @@ void JsonAPI::handleAuthorizeCommand(const QJsonObject &message, const QString &
if (!token.isEmpty())
{
// userToken is longer
if (token.count() > 36)
if (token.size() > 36)
{
if (API::isUserTokenAuthorized(token))
sendSuccessReply(command + "-" + subc, tan);
@@ -1435,7 +1435,7 @@ void JsonAPI::handleAuthorizeCommand(const QJsonObject &message, const QString &
return;
}
// usual app token is 36
if (token.count() == 36)
if (token.size() == 36)
{
if (API::isTokenAuthorized(token))
{
@@ -1449,7 +1449,7 @@ void JsonAPI::handleAuthorizeCommand(const QJsonObject &message, const QString &
// password
// use password
if (password.count() >= 8)
if (password.size() >= 8)
{
QString userTokenRep;
if (API::isUserAuthorized(password) && API::getUserToken(userTokenRep))

View File

@@ -171,6 +171,7 @@ void JsonCB::setSubscriptionsTo(Hyperion* hyperion)
void JsonCB::doCallback(const QString& cmd, const QVariant& data)
{
QJsonObject obj;
obj["instance"] = _hyperion->getInstanceIndex();
obj["command"] = cmd;
if (data.userType() == QMetaType::QJsonArray)