mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
add neutrino restart to webif
Origin commit data
------------------
Commit: 822993d333
Author: TangoCash <eric@loxat.de>
Date: 2021-09-17 (Fri, 17 Sep 2021)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -111,6 +111,7 @@ private:
|
||||
void LCDAction(CyhookHandler *hh);
|
||||
void YWebCGI(CyhookHandler *hh);
|
||||
void RebootCGI(CyhookHandler *hh);
|
||||
void RestartCGI(CyhookHandler *hh);
|
||||
void RCEmCGI(CyhookHandler *hh);
|
||||
void AspectRatioCGI(CyhookHandler *hh);
|
||||
void VideoFormatCGI(CyhookHandler *hh);
|
||||
|
@@ -132,6 +132,7 @@ CNeutrinoAPI::CNeutrinoAPI()
|
||||
EventServer = new CEventServer;
|
||||
EventServer->registerEvent2( NeutrinoMessages::SHUTDOWN, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::REBOOT, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::RESTART, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::STANDBY_ON, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
EventServer->registerEvent2( NeutrinoMessages::STANDBY_TOGGLE, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
|
||||
|
Reference in New Issue
Block a user