add neutrino restart to webif

Origin commit data
------------------
Branch: ni/coolstream
Commit: 822993d333
Author: TangoCash <eric@loxat.de>
Date: 2021-09-17 (Fri, 17 Sep 2021)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2021-09-17 23:20:40 +02:00
committed by vanhofen
parent 7f3f22ea62
commit f92278c106
11 changed files with 44 additions and 3 deletions

View File

@@ -194,6 +194,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"standby", &CControlAPI::StandbyCGI, "text/plain"},
{"shutdown", &CControlAPI::ShutdownCGI, "text/plain"},
{"reboot", &CControlAPI::RebootCGI, "text/plain"},
{"restart", &CControlAPI::RestartCGI, "text/plain"},
{"getdate", &CControlAPI::GetDateCGI, "text/plain"},
{"gettime", &CControlAPI::GetTimeCGI, "text/plain"},
{"info", &CControlAPI::InfoCGI, "text/plain"},
@@ -888,6 +889,18 @@ void CControlAPI::RebootCGI(CyhookHandler *hh)
hh->SendError();
}
//-----------------------------------------------------------------------------
void CControlAPI::RestartCGI(CyhookHandler *hh)
{
if (hh->ParamList.empty())
{
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::RESTART, CEventServer::INITID_HTTPD);
hh->SendOk();
}
else
hh->SendError();
}
//-----------------------------------------------------------------------------
unsigned int revert_translate(unsigned int code)
{