summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-28 14:00:28 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-28 14:00:28 +0100
commit457f5dd14c426c7324a7987c4bcd7f9b2b641b6d (patch)
tree6f2d2d38abfdc9474aa3eb01fc4bb1bc6f0e4d56
parent9887c0765bb2e2653dfc0325e8b6784084787102 (diff)
downloadvdr-457f5dd14c426c7324a7987c4bcd7f9b2b641b6d.tar.gz
vdr-457f5dd14c426c7324a7987c4bcd7f9b2b641b6d.tar.bz2
The status changes of EPG events are now logged for all channels that have timers
-rw-r--r--HISTORY1
-rw-r--r--channels.c12
-rw-r--r--channels.h3
-rw-r--r--epg.c5
-rw-r--r--menu.c12
5 files changed, 21 insertions, 12 deletions
diff --git a/HISTORY b/HISTORY
index 94a8ca31..69aa8470 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4421,3 +4421,4 @@ Video Disk Recorder Revision History
- Reduced the number of events to actually check when setting events to timers.
- cMenuEditIntItem now checks the given value and forces it to be between the
given min and max limits.
+- The status changes of EPG events are now logged for all channels that have timers.
diff --git a/channels.c b/channels.c
index bf1230bd..c4000616 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 1.48 2006/01/14 15:51:02 kls Exp $
+ * $Id: channels.c 1.49 2006/02/28 13:54:34 kls Exp $
*/
#include "channels.h"
@@ -12,6 +12,7 @@
#include <ctype.h>
#include "device.h"
#include "epg.h"
+#include "timers.h"
// IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
// format characters in order to allow any number of blanks after a numeric
@@ -248,6 +249,15 @@ int cChannel::Transponder(void) const
return tf;
}
+bool cChannel::HasTimer(void) const
+{
+ for (cTimer *Timer = Timers.First(); Timer; Timer = Timers.Next(Timer)) {
+ if (Timer->Channel() == this)
+ return true;
+ }
+ return false;
+}
+
int cChannel::Modification(int Mask)
{
int Result = modification & Mask;
diff --git a/channels.h b/channels.h
index ef4e80b3..c7da4f35 100644
--- a/channels.h
+++ b/channels.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.h 1.39 2006/02/19 14:39:43 kls Exp $
+ * $Id: channels.h 1.40 2006/02/28 13:52:49 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -202,6 +202,7 @@ public:
bool IsSat(void) const { return cSource::IsSat(source); }
bool IsTerr(void) const { return cSource::IsTerr(source); }
tChannelID GetChannelID(void) const { return tChannelID(source, nid, (nid || tid) ? tid : Transponder(), sid, rid); }
+ bool HasTimer(void) const;
int Modification(int Mask = CHANNELMOD_ALL);
void CopyTransponderData(const cChannel *Channel);
bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH);
diff --git a/epg.c b/epg.c
index 2f88af9a..9b24da46 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.64 2006/02/26 15:07:17 kls Exp $
+ * $Id: epg.c 1.65 2006/02/28 13:56:05 kls Exp $
*/
#include "epg.h"
@@ -156,8 +156,7 @@ void cEvent::SetVersion(uchar Version)
void cEvent::SetRunningStatus(int RunningStatus, cChannel *Channel)
{
- if (Channel && runningStatus != RunningStatus && (RunningStatus > SI::RunningStatusNotRunning || runningStatus > SI::RunningStatusUndefined))
- if (Channel->Number() <= 30)//XXX maybe log only those that have timers???
+ if (Channel && runningStatus != RunningStatus && (RunningStatus > SI::RunningStatusNotRunning || runningStatus > SI::RunningStatusUndefined) && Channel->HasTimer())
isyslog("channel %d (%s) event %s '%s' status %d", Channel->Number(), Channel->Name(), *GetTimeString(), Title(), RunningStatus);
runningStatus = RunningStatus;
}
diff --git a/menu.c b/menu.c
index 0d555286..f3c9fab9 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.423 2006/02/28 12:15:43 kls Exp $
+ * $Id: menu.c 1.424 2006/02/28 13:58:00 kls Exp $
*/
#include "menu.h"
@@ -500,12 +500,10 @@ eOSState cMenuChannels::Delete(void)
cChannel *channel = GetChannel(Current());
int DeletedChannel = channel->Number();
// Check if there is a timer using this channel:
- for (cTimer *ti = Timers.First(); ti; ti = Timers.Next(ti)) {
- if (ti->Channel() == channel) {
- Skins.Message(mtError, tr("Channel is being used by a timer!"));
- return osContinue;
- }
- }
+ if (channel->HasTimer()) {
+ Skins.Message(mtError, tr("Channel is being used by a timer!"));
+ return osContinue;
+ }
if (Interface->Confirm(tr("Delete channel?"))) {
Channels.Del(channel);
cOsdMenu::Del(Index);