diff options
author | horchi <vdr@jwendel.de> | 2017-03-19 11:51:35 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-19 11:51:35 +0100 |
commit | d0249c8207351fb978b0bcd090c491443960a33b (patch) | |
tree | d585af3ee5f5d7c69347ccf5d0c0ed7da465fe4a | |
parent | 577b2c73f353f3528af4214808284cb6ac3ced31 (diff) | |
download | vdr-plugin-epg2vdr-d0249c8207351fb978b0bcd090c491443960a33b.tar.gz vdr-plugin-epg2vdr-d0249c8207351fb978b0bcd090c491443960a33b.tar.bz2 |
minor change
-rw-r--r-- | epg2vdr.c | 7 | ||||
-rw-r--r-- | epg2vdr.h | 1 |
2 files changed, 7 insertions, 1 deletions
@@ -411,6 +411,7 @@ void cMenuSetupEPG2VDR::Store() cPluginEPG2VDR::cPluginEPG2VDR() { + pluginInitialized = no; oUpdate = 0; connection = 0; timerDb = 0; @@ -801,7 +802,7 @@ cString cPluginEPG2VDR::SVDRPCommand(const char* cmd, const char* Option, int &R bool cPluginEPG2VDR::Service(const char* id, void* data) { - if (!data) + if (!data || !pluginInitialized) return fail; tell(4, "Service called with '%s', %d/%d", id, @@ -959,7 +960,10 @@ bool cPluginEPG2VDR::Start() oUpdate = new cUpdate(this); if (oUpdate->init() == success) + { oUpdate->Start(); // start plugin thread + pluginInitialized = yes; + } else tell(0, "Initialization failed, start of plugin aborted!"); @@ -1050,6 +1054,7 @@ void cPluginEPG2VDR::Stop() req.action = mieaExit; Service(MYSQL_INIT_EXIT, &req); + pluginInitialized = no; } //*************************************************************************** @@ -70,6 +70,7 @@ class cPluginEPG2VDR : public cPlugin private: + int pluginInitialized; cDbConnection* connection; cDbTable* timerDb; cDbTable* vdrDb; |