diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-03-09 18:31:28 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-03-09 18:31:28 +0100 |
commit | 2da0dc7af7c885c10b9511040c42ee5198a2cfa1 (patch) | |
tree | e6b6deced3cc0404c469662c1d9644eaf356809f /infosatepg.cpp | |
parent | 2417d1f3902ee7bfa78ffd6aeb3ea5421a7ac2dd (diff) | |
download | vdr-plugin-infosatepg-2da0dc7af7c885c10b9511040c42ee5198a2cfa1.tar.gz vdr-plugin-infosatepg-2da0dc7af7c885c10b9511040c42ee5198a2cfa1.tar.bz2 |
Changed thread handlingv0.0.8
Diffstat (limited to 'infosatepg.cpp')
-rw-r--r-- | infosatepg.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/infosatepg.cpp b/infosatepg.cpp index 74f029b..2c1b974 100644 --- a/infosatepg.cpp +++ b/infosatepg.cpp @@ -26,6 +26,7 @@ cPluginInfosatepg::cPluginInfosatepg(void) // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT! statusMonitor=NULL; global=new cGlobalInfosatepg; + process=new cProcessInfosatepg(); pmac=EPG_FIRST_DAY_MAC; } @@ -33,6 +34,7 @@ cPluginInfosatepg::~cPluginInfosatepg() { // Clean up after yourself! if (statusMonitor) delete statusMonitor; + delete process; delete global; } @@ -104,13 +106,13 @@ bool cPluginInfosatepg::Start(void) isyslog("infosatepg: failed to load plugin status"); } statusMonitor = new cStatusInfosatepg(global); - return true; } void cPluginInfosatepg::Stop(void) { // Stop any background activities the plugin is performing. + process->Stop(); if (global->Save()==-1) { isyslog("infosatepg: failed to save plugin status"); @@ -131,10 +133,14 @@ void cPluginInfosatepg::MainThreadHook(void) { if (!global->Infosatdata[pmac].Processed) { - isyslog ("infosatepg: found data to be processed: day=%i month=%i", - global->Infosatdata[pmac].Day(),global->Infosatdata[pmac].Month()); - cProcessInfosatepg process(pmac,global); - process.Start(); + if (!process->Active()) + { + isyslog ("infosatepg: found data to be processed: day=%i month=%i", + global->Infosatdata[pmac].Day(),global->Infosatdata[pmac].Month()); + + process->SetInfo(pmac,global); + process->Start(); + } } else { |