- yweb: fix /control/reboot

This commit is contained in:
svenhoefer
2013-09-28 22:25:41 +02:00
parent b25b1c4fb5
commit 5227f726c9
3 changed files with 12 additions and 3 deletions

View File

@@ -624,9 +624,13 @@ void CControlAPI::ShutdownCGI(CyhookHandler *hh)
//-----------------------------------------------------------------------------
void CControlAPI::RebootCGI(CyhookHandler *hh)
{
FILE *f = fopen("/tmp/.reboot", "w");
fclose(f);
return ShutdownCGI(hh);
if (hh->ParamList.empty())
{
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::REBOOT, CEventServer::INITID_HTTPD);
hh->SendOk();
}
else
hh->SendError();
}
//-----------------------------------------------------------------------------