summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-05-26 10:00:59 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-05-26 10:00:59 +0200
commitdc0209147ea0fd0d94e8e870a0da0bb914ed1920 (patch)
tree08c5872009fbc4bdef38b8dab08002b06dfdf077
parenta05590796ad98d994eca1b24c69d164d05e34f60 (diff)
downloadvdr-dc0209147ea0fd0d94e8e870a0da0bb914ed1920.tar.gz
vdr-dc0209147ea0fd0d94e8e870a0da0bb914ed1920.tar.bz2
The SVDRP command DELR no longer deletes recordings that are currently being written to by a timer
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY4
-rw-r--r--svdrp.c16
3 files changed, 16 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index a9e8ffaf..2880c8e5 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -770,6 +770,8 @@ Sascha Volkenandt <sascha@akv-soft.de>
Digital audio after switching to a channel that has DD and selecting the DD audio
track
for reporting a bug in timeout handling in cRwLock::Lock()
+ for pointing out that the SVDRP command DELR deleted recordings that are currently
+ being written to by a timer
Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
for modifying LOF handling to allow for C-band reception
diff --git a/HISTORY b/HISTORY
index de44340d..1a6347b4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3513,7 +3513,7 @@ Video Disk Recorder Revision History
- Fixed a wrong inheritance in libsi's SubtitlingDescriptor::Subtitling (thanks to
Marco Schlüßler).
-2005-05-22: Version 1.3.25
+2005-05-26: Version 1.3.25
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Some cable providers don't mark short channel names according to the standard,
@@ -3553,3 +3553,5 @@ Video Disk Recorder Revision History
from being set to a wrong value (thanks to Marco Schlüßler).
- Fixed a possible hangup when ending a replay session while cIndexFile::CatchUp()
is waiting (thanks to Marco Schlüßler).
+- The SVDRP command DELR no longer deletes recordings that are currently being
+ written to by a timer (thanks to Sascha Volkenandt for pointing out this one).
diff --git a/svdrp.c b/svdrp.c
index 30b4adfb..a63a575d 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
- * $Id: svdrp.c 1.71 2005/05/16 14:20:25 kls Exp $
+ * $Id: svdrp.c 1.72 2005/05/26 09:59:09 kls Exp $
*/
#include "svdrp.h"
@@ -31,6 +31,7 @@
#include "device.h"
#include "eitscan.h"
#include "keys.h"
+#include "menu.h"
#include "remote.h"
#include "timers.h"
#include "tools.h"
@@ -505,12 +506,17 @@ void cSVDRP::CmdDELR(const char *Option)
if (isnumber(Option)) {
cRecording *recording = Recordings.Get(strtol(Option, NULL, 10) - 1);
if (recording) {
- if (recording->Delete()) {
- Reply(250, "Recording \"%s\" deleted", Option);
- ::Recordings.Load(); // must make sure the global recordings list is updated
+ cRecordControl *rc = cRecordControls::GetRecordControl(recording->FileName());
+ if (!rc) {
+ if (recording->Delete()) {
+ Reply(250, "Recording \"%s\" deleted", Option);
+ ::Recordings.Load(); // must make sure the global recordings list is updated
+ }
+ else
+ Reply(554, "Error while deleting recording!");
}
else
- Reply(554, "Error while deleting recording!");
+ Reply(550, "Recording \"%s\" is in use by timer %d", Option, rc->Timer()->Index() + 1);
}
else
Reply(550, "Recording \"%s\" not found%s", Option, Recordings.Count() ? "" : " (use LSTR before deleting)");