From 97b63a6f883300254372c18a60b9efba25189d06 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Mon, 15 Feb 2021 21:14:06 +0100 Subject: fix to proper Stop(), add some debug log and rename thread matching plugin name --- plugin.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'plugin.c') diff --git a/plugin.c b/plugin.c index 517c23b..1d8cd1e 100644 --- a/plugin.c +++ b/plugin.c @@ -93,6 +93,7 @@ public: virtual bool ProcessArgs(int argc, char * argv[]); virtual bool Initialize(); virtual bool Start(); + virtual void Stop(void); virtual void Housekeeping(); virtual const char **SVDRPHelpPages(void); virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode); @@ -120,12 +121,18 @@ cPluginGraphLCD::cPluginGraphLCD() cPluginGraphLCD::~cPluginGraphLCD() { - for (unsigned int index = 0; index < GRAPHLCD_MAX_DISPLAYS; index++) - DisconnectDisplay(index); mExtData->ReleaseExtData(); mExtData = NULL; } +void cPluginGraphLCD::Stop(void) +{ + for (unsigned int index = 0; index < GRAPHLCD_MAX_DISPLAYS; index++) { + dsyslog("graphlcd plugin: DisconnectDisplay %d", index); + DisconnectDisplay(index); + }; +} + const char * cPluginGraphLCD::CommandLineHelp() { return " -c, --config=CFG use CFG as driver config file (default is \"" PLUGIN_GRAPHLCDCONF "\")\n" -- cgit v1.2.3