From e0cdb415765bfeb3f77f38f0c924dc81e11bc5d6 Mon Sep 17 00:00:00 2001 From: GetAway Date: Sat, 28 May 2022 21:04:58 +0200 Subject: [PATCH] - neutrino.cpp: stop lcd4l thread for flashing and remove dead code In src/system/flashtool.cpp there was still old, unused code, which once stopped LCD4L during flash. However, it has not been jumped and executed for a long time. I have removed it now and introduced the corresponding code section in neutrino.cpp in stop_deamons() and reactivated so the stopping of the daemon. The sighandler() function calls up also stop_daemons(), so I removed the code there --- src/neutrino.cpp | 10 ++++++---- src/system/flashtool.cpp | 15 --------------- src/system/flashtool.h | 1 - 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index dd07894a2..b12af9ebc 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -5571,6 +5571,12 @@ void stop_daemons(bool stopall, bool for_flash) tuxtxt_stop(); tuxtxt_close(); +#ifdef ENABLE_LCD4LINUX + if (g_settings.lcd4l_support) { + CLCD4l::getInstance()->StopLCD4l(); + delete CLCD4l::getInstance(); + } +#endif #ifdef ENABLE_GRAPHLCD cGLCD::Exit(); #endif @@ -5657,10 +5663,6 @@ void sighandler (int signum) case SIGTERM: case SIGINT: CVFD::getInstance()->ShowText("Exiting ..."); -#ifdef ENABLE_LCD4LINUX - CLCD4l::getInstance()->StopLCD4l(); - delete CLCD4l::getInstance(); -#endif delete cHddStat::getInstance(); delete CRecordManager::getInstance(); //CNeutrinoApp::getInstance()->saveSetup(NEUTRINO_SETTINGS_FILE); diff --git a/src/system/flashtool.cpp b/src/system/flashtool.cpp index c13bc451b..df428343e 100644 --- a/src/system/flashtool.cpp +++ b/src/system/flashtool.cpp @@ -44,10 +44,6 @@ #include #include -#ifdef ENABLE_LCD4LINUX -#include "driver/lcd4l.h" -#endif - CFlashTool::CFlashTool() { statusViewer = NULL; @@ -340,17 +336,6 @@ bool CFlashTool::getInfo() return true; } - -void CFlashTool::stopDaemons() -{ -#ifdef ENABLE_LCD4LINUX - if (g_settings.lcd4l_support) - CLCD4l::getInstance()->StopLCD4l(); -#endif - - CNeutrinoApp::getInstance()->stopDaemonsForFlash(); -} - bool CFlashTool::erase(int globalProgressEnd) { erase_info_t lerase; diff --git a/src/system/flashtool.h b/src/system/flashtool.h index 7f423a9db..7fb6bd2dc 100644 --- a/src/system/flashtool.h +++ b/src/system/flashtool.h @@ -53,7 +53,6 @@ class CFlashTool bool getInfo(); bool erase(int globalProgressEnd=-1); - void stopDaemons(); public: CFlashTool();