From 30d262fa8871771ceca38828f52d8441c4d62743 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 13 Feb 2004 13:36:52 +0100 Subject: [PATCH] Fixed editing and creating new channels --- HISTORY | 2 ++ menu.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index cdb8f7b6..ba783f69 100644 --- a/HISTORY +++ b/HISTORY @@ -2657,3 +2657,5 @@ Video Disk Recorder Revision History - Fixed reading the EPG preferred language parameter from 'setup.conf'. - Fixed switching to a visible programme in case the current channel has neither a video nor an audio PID. +- Fixed editing channels (SID now range checked) and creating new channels (NID, + TID and RID are now set to 0). diff --git a/menu.c b/menu.c index 6a7907f7..2ffa6d9f 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.284 2004/02/08 15:06:42 kls Exp $ + * $Id: menu.c 1.285 2004/02/13 13:23:07 kls Exp $ */ #include "menu.h" @@ -557,8 +557,12 @@ cMenuEditChannel::cMenuEditChannel(cChannel *Channel, bool New) channel = Channel; if (channel) { data = *channel; - if (New) + if (New) { channel = NULL; + data.nid = 0; + data.tid = 0; + data.rid = 0; + } Setup(); } } @@ -583,7 +587,7 @@ void cMenuEditChannel::Setup(void) Add(new cMenuEditIntItem( tr("Dpid2"), &data.dpids[1], 0, 0x1FFF)); Add(new cMenuEditIntItem( tr("Tpid"), &data.tpid, 0, 0x1FFF)); Add(new cMenuEditCaItem( tr("CA"), &data.caids[0], true));//XXX - Add(new cMenuEditIntItem( tr("Sid"), &data.sid, 0)); + Add(new cMenuEditIntItem( tr("Sid"), &data.sid, 1, 0xFFFF)); /* XXX not yet used Add(new cMenuEditIntItem( tr("Nid"), &data.nid, 0)); Add(new cMenuEditIntItem( tr("Tid"), &data.tid, 0));