summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--vdr.c10
3 files changed, 10 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 3736be43..985149fd 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -386,6 +386,7 @@ Rudi Hofer (Rudi.Hofer@cadsoft.de)
Gregoire Favre <greg@ulima.unil.ch>
for fixing some function headers to make them compile with gcc 3.x
+ for reporting a bug in taking an active SVDRP connection into account when doing shutdown
Sven Grothklags <sven@uni-paderborn.de>
for fixing the cutting mechanism to make it re-sync in case a frame is larger
diff --git a/HISTORY b/HISTORY
index 1fc8421d..937a5d3b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1867,3 +1867,5 @@ Video Disk Recorder Revision History
- Now checking if there is a connection to the keyboard (thanks to Jaakko Hyvätti)
and only creating the KBD remote control if VDR is running in the foreground.
+- Fixed taking an active SVDRP connection into account when doing shutdown (thanks
+ to Gregoire Favre for reporting this one).
diff --git a/vdr.c b/vdr.c
index e253b792..b721cb36 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.138 2002/12/13 13:37:28 kls Exp $
+ * $Id: vdr.c 1.139 2002/12/13 14:30:00 kls Exp $
*/
#include <getopt.h>
@@ -424,6 +424,7 @@ int main(int argc, char *argv[])
time_t LastActivity = 0;
int MaxLatencyTime = 0;
bool ForceShutdown = false;
+ bool UserShutdown = false;
if (WatchdogTimeout > 0) {
dsyslog("setting watchdog timer to %d seconds", WatchdogTimeout);
@@ -539,6 +540,7 @@ int main(int argc, char *argv[])
ForceShutdown = true;
}
LastActivity = 1; // not 0, see below!
+ UserShutdown = true;
break;
default: break;
}
@@ -647,7 +649,7 @@ int main(int argc, char *argv[])
Interface->Info(tr("Editing process finished"));
}
}
- if (!Interact && ((!cRecordControls::Active() && !cCutter::Active() && !Interface->HasSVDRPConnection()) || ForceShutdown)) {
+ if (!Interact && ((!cRecordControls::Active() && !cCutter::Active() && (!Interface->HasSVDRPConnection() || UserShutdown)) || ForceShutdown)) {
time_t Now = time(NULL);
if (Now - LastActivity > ACTIVITYTIMEOUT) {
// Shutdown:
@@ -665,12 +667,13 @@ int main(int argc, char *argv[])
else
LastActivity = 1;
}
- bool UserShutdown = key == kPower;
if (UserShutdown && Next && Delta <= Setup.MinEventTimeout * 60 && !ForceShutdown) {
char *buf;
asprintf(&buf, tr("Recording in %d minutes, shut down anyway?"), Delta / 60);
if (Interface->Confirm(buf))
ForceShutdown = true;
+ else
+ UserShutdown = false;
free(buf);
}
if (!Next || Delta > Setup.MinEventTimeout * 60 || ForceShutdown) {
@@ -694,6 +697,7 @@ int main(int argc, char *argv[])
signal(SIGALRM, SIG_IGN);
}
LastActivity = time(NULL); // don't try again too soon
+ UserShutdown = false;
continue; // skip the rest of the housekeeping for now
}
}