summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Lehtimäki <matti.lehtimaki@gmail.com>2012-05-12 23:18:46 +0300
committerMatti Lehtimäki <matti.lehtimaki@gmail.com>2012-05-12 23:18:46 +0300
commitab07e19f70541eb6e7eb07362dd4cbf40eb08b6a (patch)
treee36941ac2de64c690d929c93f29eb37f8a0257fe
parente5cbb3e43d92af2d56d886e3ddf304ac0ea4ec3a (diff)
downloadvdr-plugin-epgfixer-ab07e19f70541eb6e7eb07362dd4cbf40eb08b6a.tar.gz
vdr-plugin-epgfixer-ab07e19f70541eb6e7eb07362dd4cbf40eb08b6a.tar.bz2
Fix variable initialisation bug, thanks to Rolf Ahrenberg.
-rw-r--r--tools.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools.c b/tools.c
index 4616c4b..dd1451a 100644
--- a/tools.c
+++ b/tools.c
@@ -182,9 +182,8 @@ public:
};
cAddEventThread::cAddEventThread(void)
-:cThread("add events to schedule")
+:cThread("cAddEventThread"), LastHandleEvent()
{
- LastHandleEvent = time(NULL);
list = new cList<cAddEventListItem>;
}
@@ -218,8 +217,8 @@ void cAddEventThread::Action(void)
void cAddEventThread::AddEvent(cEvent *Event, tChannelID ChannelID)
{
LOCK_THREAD;
- LastHandleEvent.Set(INSERT_TIMEOUT_IN_MS);
list->Add(new cAddEventListItem(Event, ChannelID));
+ LastHandleEvent.Set(INSERT_TIMEOUT_IN_MS);
}
static cAddEventThread AddEventThread;
@@ -228,9 +227,9 @@ static cAddEventThread AddEventThread;
void AddEvent(cEvent *Event, tChannelID ChannelID)
{
+ AddEventThread.AddEvent(Event, ChannelID);
if (!AddEventThread.Active())
AddEventThread.Start();
- AddEventThread.AddEvent(Event, ChannelID);
}
// --- Listitem ----------------------------------------