From ab07e19f70541eb6e7eb07362dd4cbf40eb08b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Sat, 12 May 2012 23:18:46 +0300 Subject: Fix variable initialisation bug, thanks to Rolf Ahrenberg. --- tools.c | 7 +++---- 1 file 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; } @@ -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 ---------------------------------------- -- cgit v1.2.3