summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-08-11 15:48:54 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-08-11 15:48:54 +0200
commitf7fff8b7be0cf0017cd83302439d3b44048669dc (patch)
treeccf8bcc398037f983e872a59029ec7ca506f93e9
parent0b73f060d0a3b72bfac3da139d2cb0e40b1a78bc (diff)
downloadvdr-f7fff8b7be0cf0017cd83302439d3b44048669dc.tar.gz
vdr-f7fff8b7be0cf0017cd83302439d3b44048669dc.tar.bz2
If there is no free DVB device to record, the log message will now be given only once
-rw-r--r--HISTORY4
-rw-r--r--config.c11
-rw-r--r--config.h5
-rw-r--r--menu.c7
-rw-r--r--vdr.c7
5 files changed, 21 insertions, 13 deletions
diff --git a/HISTORY b/HISTORY
index ffe6c263..65474555 100644
--- a/HISTORY
+++ b/HISTORY
@@ -622,7 +622,7 @@ Video Disk Recorder Revision History
- Fixed calculating the timeout value in cFile::FileReady() (thanks to
Wolfgang Henselmann-Weiss).
-2001-08-10: Version 0.91
+2001-08-11: Version 0.91
- Fixed displaying colored button texts that are too long.
- Suppressing replay progress display when replaying a DVD.
@@ -646,3 +646,5 @@ Video Disk Recorder Revision History
See the description of the "Red" key in MANUAL under "Replay Control" for
details.
- Fixed displaying editing marks when toggling a mark in "pause" mode.
+- If there is no free DVB device to record, the log message will now be given
+ only once.
diff --git a/config.c b/config.c
index b28be724..27cd62ed 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.53 2001/08/11 08:38:11 kls Exp $
+ * $Id: config.c 1.54 2001/08/11 15:34:42 kls Exp $
*/
#include "config.h"
@@ -320,7 +320,7 @@ char *cTimer::buffer = NULL;
cTimer::cTimer(bool Instant)
{
startTime = stopTime = 0;
- recording = false;
+ recording = pending = false;
active = Instant;
cChannel *ch = Channels.GetByNumber(cDvbApi::CurrentChannel());
channel = ch ? ch->number : 0;
@@ -343,7 +343,7 @@ cTimer::cTimer(bool Instant)
cTimer::cTimer(const cEventInfo *EventInfo)
{
startTime = stopTime = 0;
- recording = false;
+ recording = pending = false;
active = true;
cChannel *ch = Channels.GetByServiceID(EventInfo->GetServiceID());
channel = ch ? ch->number : 0;
@@ -570,6 +570,11 @@ void cTimer::SetRecording(bool Recording)
isyslog(LOG_INFO, "timer %d %s", Index() + 1, recording ? "start" : "stop");
}
+void cTimer::SetPending(bool Pending)
+{
+ pending = Pending;
+}
+
cTimer *cTimer::GetMatch(void)
{
time_t t = time(NULL); // all timers must be checked against the exact same time to correctly handle Priority!
diff --git a/config.h b/config.h
index 2f11848c..c9faf6cb 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.58 2001/08/10 12:40:43 kls Exp $
+ * $Id: config.h 1.59 2001/08/11 15:28:21 kls Exp $
*/
#ifndef __CONFIG_H
@@ -122,7 +122,7 @@ private:
static const char *ToText(cTimer *Timer);
public:
enum { MaxFileName = 256 };
- bool recording;
+ bool recording, pending;
int active;
int channel;
int day;
@@ -145,6 +145,7 @@ public:
time_t StartTime(void);
time_t StopTime(void);
void SetRecording(bool Recording);
+ void SetPending(bool Pending);
static cTimer *GetMatch(void);
static int TimeToInt(int t);
static time_t Day(time_t t);
diff --git a/menu.c b/menu.c
index 3610e84f..64edb56e 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.101 2001/08/11 15:04:05 kls Exp $
+ * $Id: menu.c 1.102 2001/08/11 15:47:23 kls Exp $
*/
#include "menu.h"
@@ -2072,6 +2072,7 @@ cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)
Timers.Save();
asprintf(&instantId, cDvbApi::NumDvbApis > 1 ? "%s - %d" : "%s", Channels.GetChannelNameByNumber(timer->channel), dvbApi->CardIndex() + 1);
}
+ timer->SetPending(true);
timer->SetRecording(true);
if (Channels.SwitchTo(timer->channel, dvbApi)) {
cRecording Recording(timer);
@@ -2134,8 +2135,8 @@ bool cRecordControls::Start(cTimer *Timer)
}
}
}
- else if (!Timer || Timer->priority >= Setup.PrimaryLimit)
- esyslog(LOG_ERR, "ERROR: no free DVB device to record channel %d!", ch);
+ else if (!Timer || (Timer->priority >= Setup.PrimaryLimit && !Timer->pending))
+ isyslog(LOG_ERR, "no free DVB device to record channel %d!", ch);
}
else
esyslog(LOG_ERR, "ERROR: channel %d not defined!", ch);
diff --git a/vdr.c b/vdr.c
index b18d838e..af305419 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.62 2001/08/11 09:38:12 kls Exp $
+ * $Id: vdr.c 1.63 2001/08/11 15:33:30 kls Exp $
*/
#include <getopt.h>
@@ -325,9 +325,8 @@ int main(int argc, char *argv[])
if (!Menu) {
cTimer *Timer = cTimer::GetMatch();
if (Timer) {
- if (!cRecordControls::Start(Timer)) {
- //TODO need to do something to prevent the timer from hitting over and over again...
- }
+ if (!cRecordControls::Start(Timer))
+ Timer->SetPending(true);
}
cRecordControls::Process();
}