diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-01-08 10:30:47 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-01-08 10:30:47 +0100 |
commit | 6fb31a9477d93e019b0a2b4ef8457288ab0a40f4 (patch) | |
tree | ec1be57a98dca46122f3c4db262f9222c5cb3bd4 | |
parent | c232d074e05316a418320b5c5027aa68d53bc74a (diff) | |
download | vdr-plugin-infosatepg-6fb31a9477d93e019b0a2b4ef8457288ab0a40f4.tar.gz vdr-plugin-infosatepg-6fb31a9477d93e019b0a2b4ef8457288ab0a40f4.tar.bz2 |
Fixed SVDRP segfault
Improved channel chooser again
-rw-r--r-- | global.h | 2 | ||||
-rw-r--r-- | infosatepg.cpp | 18 |
2 files changed, 8 insertions, 12 deletions
@@ -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 { |