From patchwork Sun Mar 4 19:31:16 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Udo Richter X-Patchwork-Id: 12443 Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.50) id 1HNwVm-0000BC-Cf for vdr@linuxtv.org; Sun, 04 Mar 2007 20:36:50 +0100 Received: (qmail invoked by alias); 04 Mar 2007 19:35:27 -0000 X-Provags-ID: V01U2FsdGVkX19lcvo+qrBlouoV9m3l2SPyAUI54fXg0559vg3DM9 jWeRNn+B/5X66Y Message-ID: <45EB1E84.20803@gmx.de> Date: Sun, 04 Mar 2007 20:31:16 +0100 From: Udo Richter User-Agent: Thunderbird 2.0pre (Windows/20070302) MIME-Version: 1.0 To: VDR Mailing List Subject: Re: [vdr] vdr-1.5.1 & problems with the new shutdown code References: <45E9BA3B.7050605@gmx.de> <45EAAEA1.9030809@gmx.de> In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2007 19:36:50 -0000 Status: O X-Status: X-Keywords: X-UID: 12364 Rolf Ahrenberg wrote: > On Sun, 4 Mar 2007, Udo Richter wrote: > Mar 4 18:31:14 xxx vdr: [6740] LastActivity: Never > Mar 4 18:31:14 xxx vdr: [6740] ActiveTimeout: 2104 > Mar 4 18:31:14 xxx vdr: [6740] Retry: Never > > ... goes on and on and no shutdown attempts... Found it! And, more important: Blame Klaus! :) Klaus changed the meaning of cRemote::LastActivity() before integrating it, and missed to adapt one call to it, the cRemote::LastActivity() > ACTIVITYTIMEOUT check before doing housekeeping. And after startup, cRemote::LastActivity() will return 0, blocking all housekeeping. Correct is (time(NULL) - cRemote::LastActivity()) > ACTIVITYTIMEOUT, as in the attached patch. Cheers, Udo Index: vdr.c =================================================================== --- vdr.c (Revision 874) +++ vdr.c (Arbeitskopie) @@ -1162,7 +1162,7 @@ ShutdownHandler.countdown.Cancel(); } - if (!Interact && !cRecordControls::Active() && !cCutter::Active() && !Interface->HasSVDRPConnection() && cRemote::LastActivity() > ACTIVITYTIMEOUT) { + if (!Interact && !cRecordControls::Active() && !cCutter::Active() && !Interface->HasSVDRPConnection() && (time(NULL) - cRemote::LastActivity()) > ACTIVITYTIMEOUT) { // Handle housekeeping tasks // Shutdown: