mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
- lcd4l: fix removing start/stop hint when init script fails
Conflicts: src/driver/lcd4l.h Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -167,6 +167,8 @@ void CLCD4l::StartLCD4l()
|
||||
{
|
||||
if (exec_initscript("lcd4linux", "start", "systemctl"))
|
||||
OnAfterStart();
|
||||
else
|
||||
OnAfterError();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,6 +190,8 @@ void CLCD4l::StopLCD4l()
|
||||
|
||||
if (exec_initscript("lcd4linux", "stop", "systemctl"))
|
||||
OnAfterStop();
|
||||
else
|
||||
OnAfterError();
|
||||
}
|
||||
|
||||
void CLCD4l::SwitchLCD4l()
|
||||
@@ -881,6 +885,8 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
||||
OnBeforeRestart();
|
||||
if (exec_initscript("lcd4linux", "restart", "systemctl"))
|
||||
OnAfterRestart();
|
||||
else
|
||||
OnAfterError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -79,12 +79,13 @@ class CLCD4l
|
||||
|
||||
// use signal/slot handlers
|
||||
// That is helping to keep the GUI code away from code inside ./src/driver.
|
||||
sigc::signal<void> OnBeforeRestart,
|
||||
OnAfterRestart,
|
||||
OnBeforeStart,
|
||||
sigc::signal<void> OnBeforeStart,
|
||||
OnAfterStart,
|
||||
OnBeforeStop,
|
||||
OnAfterStop;
|
||||
OnAfterStop,
|
||||
OnBeforeRestart,
|
||||
OnAfterRestart,
|
||||
OnAfterError;
|
||||
|
||||
private:
|
||||
std::thread *thrLCD4l;
|
||||
|
@@ -328,4 +328,6 @@ void CLCD4lSetup::connectSlots()
|
||||
CLCD4l::getInstance()->OnAfterStart.connect(sl_remove);
|
||||
CLCD4l::getInstance()->OnAfterStop.connect(sl_remove);
|
||||
CLCD4l::getInstance()->OnAfterRestart.connect(sl_remove);
|
||||
|
||||
CLCD4l::getInstance()->OnAfterError.connect(sl_remove);
|
||||
}
|
||||
|
Reference in New Issue
Block a user