From 6fb31a9477d93e019b0a2b4ef8457288ab0a40f4 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Thu, 8 Jan 2009 10:30:47 +0100 Subject: Fixed SVDRP segfault Improved channel chooser again --- global.h | 2 +- infosatepg.cpp | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/global.h b/global.h index e7a4810..4c60160 100644 --- a/global.h +++ b/global.h @@ -130,11 +130,11 @@ public: dsyslog("infosatepg: time=%i",Time); if (Time==-1) return; if (wakeuptime!=-1) return; // already set + wakeuptime=Time; int hour,minute; hour=(int) (wakeuptime/100); minute=wakeuptime-(hour*100); isyslog("infosatepg: wakeup set to %02i:%02i", hour,minute); - wakeuptime=Time; } int WakeupTime() { diff --git a/infosatepg.cpp b/infosatepg.cpp index 16a56e5..47c7da7 100644 --- a/infosatepg.cpp +++ b/infosatepg.cpp @@ -173,21 +173,17 @@ void cPluginInfosatepg::MainThreadHook(void) if (dev) { if (!dev->ProvidesTransponder(chan)) continue; // device cannot provide transponder -> skip + if (EITScanner.UsesDevice(dev)) continue; // EITScanner is updating EPG -> skip + if (dev->Receiving()) continue; // device is recording -> skip + if (dev->IsPrimaryDevice()) continue; // device is primary -> skip + if (cDevice::ActualDevice()->CardIndex()==i) continue; // device is live viewing -> skip if (dev->IsTunedToTransponder(chan)) { - // just use this device - dsyslog("infosatepg: found already switched device %i",dev->DeviceNumber()+1); - if (cDevice::ActualDevice()->CardIndex()==i) - cDevice::PrimaryDevice()->SwitchChannel(chan,true); - else - dev->SwitchChannel(chan,false); + // we already have a device which is tuned (maybe switched manually?) + // the filter will be added in status.cpp global->SetWaitTimer(); return; } - if (EITScanner.UsesDevice(dev)) continue; // EITScanner is updating EPG -> skip - if (dev->Receiving()) continue; // device is recording -> skip - if (dev->IsPrimaryDevice()) continue; // device is primary -> skip - if (cDevice::ActualDevice()->CardIndex()==i) continue; // device is live viewing -> skip // ok -> use this device dsyslog("infosatepg: found free device %i",dev->DeviceNumber()+1); @@ -299,7 +295,7 @@ cString cPluginInfosatepg::SVDRPCommand(const char *Command, const char *Option, asprintf(&output,"%s Switched: %s\n",output,global->Switched() ? "yes" : "no"); if (global->WakeupTime()!=-1) { - asprintf(&output,"%s WakeupTime: %04i ", global->WakeupTime()); + asprintf(&output,"%s WakeupTime: %04i ", output,global->WakeupTime()); } else { -- cgit v1.2.3