summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-03-19 11:51:35 +0100
committerhorchi <vdr@jwendel.de>2017-03-19 11:51:35 +0100
commitd0249c8207351fb978b0bcd090c491443960a33b (patch)
treed585af3ee5f5d7c69347ccf5d0c0ed7da465fe4a
parent577b2c73f353f3528af4214808284cb6ac3ced31 (diff)
downloadvdr-plugin-epg2vdr-d0249c8207351fb978b0bcd090c491443960a33b.tar.gz
vdr-plugin-epg2vdr-d0249c8207351fb978b0bcd090c491443960a33b.tar.bz2
minor change
-rw-r--r--epg2vdr.c7
-rw-r--r--epg2vdr.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/epg2vdr.c b/epg2vdr.c
index cb1d6ee..27f3ee9 100644
--- a/epg2vdr.c
+++ b/epg2vdr.c
@@ -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;
}
//***************************************************************************
diff --git a/epg2vdr.h b/epg2vdr.h
index c4e341b..172fdf0 100644
--- a/epg2vdr.h
+++ b/epg2vdr.h
@@ -70,6 +70,7 @@ class cPluginEPG2VDR : public cPlugin
private:
+ int pluginInitialized;
cDbConnection* connection;
cDbTable* timerDb;
cDbTable* vdrDb;