diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 916613966..f035c1881 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -805,6 +805,10 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 *msg = NeutrinoMessages::SHUTDOWN; *data = 0; break; + case NeutrinoMessages::REBOOT : + *msg = NeutrinoMessages::REBOOT; + *data = 0; + break; case NeutrinoMessages::EVT_POPUP : *msg = NeutrinoMessages::EVT_POPUP; *data = (unsigned) p; diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index a472813ae..9bb3b9f5e 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -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(); } //----------------------------------------------------------------------------- diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp index 6ed67da7b..e81b881c4 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp @@ -119,6 +119,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::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");