reelchannelscan-0.3.0 with complete empty channels.conf before

Message ID 200605301522.12083.zzam@gentoo.org
State New
Headers

Commit Message

Matthias Schwarzott May 30, 2006, 1:22 p.m. UTC
  Hi!

With this patch applied reelchannelscan will no longer crash if the 
channels.conf file was completely empty before scanning.

Btw. why I am able to start vdr with a completely empty channels.conf, but not 
when the file is missing. I thinks this should be changed, vdr should create 
the file if necessary.

Matthias
  

Comments

Lauri Tischler May 30, 2006, 1:57 p.m. UTC | #1
Matthias Schwarzott wrote:

> With this patch applied reelchannelscan will no longer crash if the 
> channels.conf file was completely empty before scanning.

What on earth is 'reelchannelscan' ?
  
Matthias Schwarzott May 30, 2006, 2:46 p.m. UTC | #2
On Tuesday 30 May 2006 15:57, Lauri Tischler wrote:
> Matthias Schwarzott wrote:
> > With this patch applied reelchannelscan will no longer crash if the
> > channels.conf file was completely empty before scanning.
>
> What on earth is 'reelchannelscan' ?
>

This is a fork of the channelscan-plugin from reelmultimedia.

http://www.reel-multimedia.com/

Wiki page in german: 
http://www.vdr-wiki.de/wiki/index.php/Reelchannelscan-plugin
Alternative download: http://deela.cc.fh-lippe.de/files/vdr-reelchannelscan/

Matthias
  

Patch

diff -ru reelchannelscan-0.3.0-orig/csmenu.c reelchannelscan-0.3.0/csmenu.c
--- reelchannelscan-0.3.0-orig/csmenu.c	2006-05-30 15:01:08.000000000 +0200
+++ reelchannelscan-0.3.0/csmenu.c	2006-05-30 15:11:02.000000000 +0200
@@ -100,7 +100,11 @@ 
   // CurrentChannel has to be greater than 0!
   CurrentChannelNr = CurrentChannelNr == 0 ? 1 : CurrentChannelNr;
   cChannel *channel = Channels.GetByNumber(CurrentChannelNr);
-  source = channel->Source();
+  if (channel) {
+    source = channel->Source();
+  } else {
+    source = cSource::FromString("S19.2E");
+  }
   currentChannel = CurrentChannelNr;
   scanActiveMenu = false;
   // timer for loop mode