summaryrefslogtreecommitdiff
path: root/process.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2009-03-05 22:01:56 +0100
committerJochen Dolze <vdr@dolze.de>2009-03-05 22:01:56 +0100
commit2417d1f3902ee7bfa78ffd6aeb3ea5421a7ac2dd (patch)
tree4ab43f05a7adbe33c811f761366300c079b48273 /process.cpp
parent7a79077d12b0cae3db32cffa35101e95ed86c8cc (diff)
downloadvdr-plugin-infosatepg-2417d1f3902ee7bfa78ffd6aeb3ea5421a7ac2dd.tar.gz
vdr-plugin-infosatepg-2417d1f3902ee7bfa78ffd6aeb3ea5421a7ac2dd.tar.bz2
Moved processing into a thread
Small wakeup handling fixes
Diffstat (limited to 'process.cpp')
-rw-r--r--process.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/process.cpp b/process.cpp
index a0b1fa5..ee168ef 100644
--- a/process.cpp
+++ b/process.cpp
@@ -612,10 +612,16 @@ const char *cInfosatevent::ExtEPG(void)
// --- cProcessInfosatepg
cProcessInfosatepg::cProcessInfosatepg(int Mac, cGlobalInfosatepg *Global)
+ :cThread("infosatepg")
{
+ mac=Mac;
global=Global;
+}
+
+void cProcessInfosatepg::Action()
+{
FILE *f;
- const char *file = global->Infosatdata[Mac].GetFile();
+ const char *file = global->Infosatdata[mac].GetFile();
f=fopen(file,"r");
if (f)
{
@@ -623,7 +629,7 @@ cProcessInfosatepg::cProcessInfosatepg(int Mac, cGlobalInfosatepg *Global)
if (ParseInfosatepg(f,&firststarttime))
{
global->SetWakeupTime(firststarttime);
- global->Infosatdata[Mac].Processed=true;
+ global->Infosatdata[mac].Processed=true;
}
else
{
@@ -637,7 +643,7 @@ cProcessInfosatepg::cProcessInfosatepg(int Mac, cGlobalInfosatepg *Global)
{
// cannot open file -> receive it again
esyslog("infosatepg: cannot access %s",file);
- global->Infosatdata[Mac].ResetReceivedAll();
+ global->Infosatdata[mac].ResetReceivedAll();
}
}
}
@@ -696,11 +702,11 @@ bool cProcessInfosatepg::AddInfosatEvent(cChannel *channel, cInfosatevent *iEven
if (!Event) Event= (cEvent *) SearchEvent(Schedule,iEvent);
if (!Event)
{
- start=iEvent->StartTime();
+ start=iEvent->StartTime();
dsyslog("infosatepg: failed to find event %s [%li (%s)]", iEvent->Title(),start,ctime(&start));
return true; // just bail out with ok
}
- start=Event->StartTime();
+ start=Event->StartTime();
dsyslog("infosatepg: changing event %s [%li]", Event->Title(),start);
// change existing event, prevent EIT EPG to update