diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 128c79db7..ebe23a612 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -817,6 +817,10 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 *msg = NeutrinoMessages::UNLOCK_RC; *data = 0; break; + case NeutrinoMessages::RELOAD_SETUP : + *msg = NeutrinoMessages::RELOAD_SETUP; + *data = 0; + break; default: printf("[neutrino] event INITID_HTTPD - unknown eventID 0x%x\n", emsg.eventID ); } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index ef04234a0..bc17d5558 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3570,6 +3570,14 @@ printf("NeutrinoMessages::EVT_BOUQUETSCHANGED\n");fflush(stdout); standbyMode( true ); return messages_return::handled; } + else if( msg == NeutrinoMessages::RELOAD_SETUP ) { + bool tmp = g_settings.make_hd_list; + loadSetup(NEUTRINO_SETTINGS_FILE); + if(tmp != g_settings.make_hd_list) + g_Zapit->reinitChannels(); + + return messages_return::handled; + } else if( msg == NeutrinoMessages::STANDBY_TOGGLE ) { standbyMode( !(mode & mode_standby) ); g_RCInput->clearRCMsg(); diff --git a/src/neutrinoMessages.h b/src/neutrinoMessages.h index 42e18ac2a..3fb035850 100644 --- a/src/neutrinoMessages.h +++ b/src/neutrinoMessages.h @@ -72,6 +72,7 @@ struct NeutrinoMessages { LOCK_RC = CRCInput::RC_Messages + 19, UNLOCK_RC = CRCInput::RC_Messages + 20, REBOOT = CRCInput::RC_Messages + 21, + RELOAD_SETUP = CRCInput::RC_Messages + 22, EVT_VOLCHANGED = CRCInput::RC_Events + 1, EVT_MUTECHANGED = CRCInput::RC_Events + 2, diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index de492fb3a..d870e9c8b 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -170,6 +170,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]= {"gettime", &CControlAPI::GetTimeCGI, "text/plain"}, {"info", &CControlAPI::InfoCGI, "text/plain"}, {"version", &CControlAPI::VersionCGI, ""}, + {"reloadsetup", &CControlAPI::ReloadNutrinoSetupfCGI, ""}, // boxcontrol - devices {"volume", &CControlAPI::VolumeCGI, "text/plain"}, {"lcd", &CControlAPI::LCDAction, "text/plain"}, @@ -1246,6 +1247,13 @@ void CControlAPI::VersionCGI(CyhookHandler *hh) { hh->SendFile("/.version"); } +//----------------------------------------------------------------------------- +void CControlAPI::ReloadNutrinoSetupfCGI(CyhookHandler *hh) +{ + NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::RELOAD_SETUP, CEventServer::INITID_HTTPD); + hh->SendOk(); +} + //----------------------------------------------------------------------------- void CControlAPI::ZaptoCGI(CyhookHandler *hh) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.h b/src/nhttpd/tuxboxapi/coolstream/controlapi.h index a1c0bf6d7..78ea95df4 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.h +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.h @@ -77,6 +77,7 @@ private: void GetBouquetsCGI(CyhookHandler *hh); void EpgCGI(CyhookHandler *hh); void VersionCGI(CyhookHandler *hh); + void ReloadNutrinoSetupfCGI(CyhookHandler *hh); void ZaptoCGI(CyhookHandler *hh); void StartPluginCGI(CyhookHandler *hh); void LCDAction(CyhookHandler *hh); diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp index 991a3f84b..80f162d97 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp @@ -128,6 +128,7 @@ CNeutrinoAPI::CNeutrinoAPI() EventServer->registerEvent2( NeutrinoMessages::EVT_START_PLUGIN, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock"); EventServer->registerEvent2( NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock"); EventServer->registerEvent2( NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock"); + EventServer->registerEvent2( NeutrinoMessages::RELOAD_SETUP, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");//reload neutrino conf } //-------------------------------------------------------------------------