[mythtv] possible error in auto-shutdown routine

David Engel gigem at comcast.net
Thu Mar 4 13:24:37 EST 2004


On Thu, Mar 04, 2004 at 06:22:36PM +0100, Marc Kessels wrote:
> I am afraid this will not help, since this part of the code will be 
> executed also a couple of lines later. (outside of the if statement where 
> you are inserting it now) 

I believe it is needed there.  I just didn't look at your message
closely enough, nor far enough down in the coce.  Please try this
patch instead.  Only the last hunk is new.

David
-- 
David Engel
gigem at comcast.net

Index: programs/mythbackend/scheduler.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/scheduler.cpp,v
retrieving revision 1.82
diff -u -r1.82 scheduler.cpp
--- programs/mythbackend/scheduler.cpp	2 Mar 2004 02:40:19 -0000	1.82
+++ programs/mythbackend/scheduler.cpp	4 Mar 2004 18:22:50 -0000
@@ -728,9 +728,13 @@
             FillRecordLists();
             PrintList();
             lastupdate = curtime;
-            startIter = reclist.begin();
             statuschanged = true;
 
+            startIter = reclist.begin();
+            for ( ; startIter != reclist.end(); startIter++)
+                if ((*startIter)->recstatus == rsWillRecord)
+                    break;
+
             // Determine if the user wants us to start recording early
             // and by how many seconds
             prerollseconds = gContext->GetNumSetting("RecordPreRoll");
@@ -916,8 +920,7 @@
                 {
                     if (!idleSince.isValid())
                     {
-                        if ((recIter = reclist.begin()) != 
-                            reclist.end())
+                        if (recIter != reclist.end())
                         {
                             if (curtime.secsTo((*recIter)->startts) - 
                                 prerollseconds > idleWaitForRecordingTime * 60)


More information about the mythtv-dev mailing list