1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Now taking an active SVDRP connection into account when doing shutdown or housekeeping

This commit is contained in:
Klaus Schmidinger 2002-11-30 14:40:10 +01:00
parent 498db82e98
commit cf40f84b82
5 changed files with 12 additions and 4 deletions

View File

@ -490,3 +490,7 @@ Georg Hitsch <georg@hitsch.at>
Clemens Kirchgatterer <clemens@thf.ath.cx>
for suggesting to change source directory name for plugins from 'SRC' to 'src'
Emil Naepflein <Emil.Naepflein@philosys.de>
for suggesting to take an active SVDRP connection into account when doing shutdown or
housekeeping

View File

@ -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).

View File

@ -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; }

View File

@ -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);
};

4
vdr.c
View File

@ -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 <getopt.h>
@ -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: