diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 39ec9b79..d80e29d3 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -490,3 +490,7 @@ Georg Hitsch Clemens Kirchgatterer for suggesting to change source directory name for plugins from 'SRC' to 'src' + +Emil Naepflein + for suggesting to take an active SVDRP connection into account when doing shutdown or + housekeeping diff --git a/HISTORY b/HISTORY index d09cbd02..e3506c74 100644 --- a/HISTORY +++ b/HISTORY @@ -1829,3 +1829,5 @@ Video Disk Recorder Revision History - Deactivated some templates in tools.h in case some plugin needs to use the STL. - Timers now accept channel IDs even if the 'source' is 0 (thanks to Stefan Huelswitt for reporting this one). +- Now taking an active SVDRP connection into account when doing shutdown or + housekeeping (suggested by Emil Naepflein). diff --git a/interface.h b/interface.h index 6344c5bd..e78b9ebc 100644 --- a/interface.h +++ b/interface.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.h 1.28 2002/09/29 10:46:50 kls Exp $ + * $Id: interface.h 1.29 2002/11/30 14:37:04 kls Exp $ */ #ifndef __INTERFACE_H @@ -33,6 +33,7 @@ public: bool IsOpen(void) { return open > 0; } void Open(int NumCols = 0, int NumLines = 0); void Close(void); + bool HasSVDRPConnection(void) { return SVDRP && SVDRP->HasConnection(); } void Interrupt(void) { interrupted = true; } int Width(void) { return width; } int Height(void) { return height; } diff --git a/svdrp.h b/svdrp.h index 8b673df6..1052d633 100644 --- a/svdrp.h +++ b/svdrp.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: svdrp.h 1.17 2002/10/20 12:44:42 kls Exp $ + * $Id: svdrp.h 1.18 2002/11/30 14:36:04 kls Exp $ */ #ifndef __SVDRP_H @@ -79,6 +79,7 @@ private: public: cSVDRP(int Port); ~cSVDRP(); + bool HasConnection(void) { return file.IsOpen(); } bool Process(void); char *GetMessage(void); }; diff --git a/vdr.c b/vdr.c index d27f302b..214cdfd2 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.134 2002/11/24 15:50:16 kls Exp $ + * $Id: vdr.c 1.135 2002/11/30 14:37:45 kls Exp $ */ #include @@ -638,7 +638,7 @@ int main(int argc, char *argv[]) Interface->Info(tr("Editing process finished")); } } - if (!Interact && ((!cRecordControls::Active() && !cCutter::Active()) || ForceShutdown)) { + if (!Interact && ((!cRecordControls::Active() && !cCutter::Active() && !Interface->HasSVDRPConnection()) || ForceShutdown)) { time_t Now = time(NULL); if (Now - LastActivity > ACTIVITYTIMEOUT) { // Shutdown: