From 029dd8aa1c3e0ad3bba47e48347ec79038f3ee36 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 20 Oct 2002 12:49:16 +0200 Subject: [PATCH] Fixed slow reaction on SVDRP input --- CONTRIBUTORS | 1 + HISTORY | 1 + interface.c | 5 +++-- svdrp.c | 6 ++++-- svdrp.h | 4 ++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d8b9a273..8c88185c 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -31,6 +31,7 @@ Guido Fiala (overlay capabilities have been removed again in VDR 0.98, since kvdr version 0.4 now does these things itself) for making the replay progress display avoid unnecessary code execution + for reporting a problem with slow reaction on SVDRP input Robert Schneider for implementing EIT support for displaying the current/next info diff --git a/HISTORY b/HISTORY index 83f9e917..dceee306 100644 --- a/HISTORY +++ b/HISTORY @@ -1626,3 +1626,4 @@ Video Disk Recorder Revision History 'channels.conf' FILE! - Timers now internally have a pointer to their channel (this is necessary to handle gaps in channel numbers, and in preparation for unique channel ids). +- Fixed slow reaction on SVDRP input (thanks to Guido Fiala for reporting this one). diff --git a/interface.c b/interface.c index 64c74894..54c282d3 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.c 1.56 2002/09/30 15:32:10 kls Exp $ + * $Id: interface.c 1.57 2002/10/20 12:45:35 kls Exp $ */ #include "interface.h" @@ -58,7 +58,8 @@ eKeys cInterface::GetKey(bool Wait) { Flush(); if (SVDRP) { - SVDRP->Process(); + if (SVDRP->Process()) + Wait = false; if (!open) { char *message = SVDRP->GetMessage(); if (message) { diff --git a/svdrp.c b/svdrp.c index a029da2f..2859fb9d 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.47 2002/10/20 10:24:20 kls Exp $ + * $Id: svdrp.c 1.48 2002/10/20 12:45:03 kls Exp $ */ #include "svdrp.h" @@ -1012,7 +1012,7 @@ void cSVDRP::Execute(char *Cmd) else Reply(500, "Command unrecognized: \"%s\"", Cmd); } -void cSVDRP::Process(void) +bool cSVDRP::Process(void) { bool NewConnection = !file.IsOpen(); bool SendGreeting = NewConnection; @@ -1073,7 +1073,9 @@ void cSVDRP::Process(void) isyslog("timeout on SVDRP connection"); Close(true); } + return true; } + return false; } char *cSVDRP::GetMessage(void) diff --git a/svdrp.h b/svdrp.h index 879fb649..8b673df6 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.16 2002/08/25 10:35:25 kls Exp $ + * $Id: svdrp.h 1.17 2002/10/20 12:44:42 kls Exp $ */ #ifndef __SVDRP_H @@ -79,7 +79,7 @@ private: public: cSVDRP(int Port); ~cSVDRP(); - void Process(void); + bool Process(void); char *GetMessage(void); };