[ANNOUNCE] VDR developer version 1.3.49

Message ID 4452CC04.9090402@gmx.de
State New
Headers

Commit Message

Udo Richter April 29, 2006, 2:14 a.m. UTC
  Dominique Simon wrote:
> I have the following problem: If a timer is running and i press power 
> off on the remote, VDR shows "eine Aufzeichnung läuft, trotzdem 
> ausschalten?". VDR Shuts down no matter if i press a key or not... Can 
> you verify this?

Yes, there's still a logical bug in it...

The 1.3.49 code shuts down if the recording shut down is confirmed *OR* 
if the plugin shut down is confirmed. Unfortunately, if no plugin has 
activity, this counts as confirmed, so VDR will shut down no matter if 
recording shut down was confirmed or not.

The attached patch reverses the logic a bit, and shuts down if 
recordings *AND* plugins confirm. UserShutdown is set up first, so that 
any non-confirm can leave with 'break'. If all tests pass, ForceShutdown 
is set too.

I've tested all variants I can think of, and it seems to work. More 
testing is of course welcome, so we can mark this one fixed before Sunday.

Btw: There's a slight change in behavior since 1.3.46: Before, a simple 
shut down without confirms did not set ForceShutdown=true, since then, 
ForceShutdown is set true even if no confirmation was necessary. 
cPluginManager::Active does not differentiate between confirmed, denied 
and 'no activity'. The new way is slightly more aggressive, but seems 
more consistent and I don't think that it has bigger negative side effects.

(1.3.49 can shut down while cutting, 1.3.46 can shut down while cutting 
only if also a recording is running, and shutdown is confirmed.)

Cheers,

Udo
  

Comments

Dominique Simon April 29, 2006, 8:40 a.m. UTC | #1
Am 29.04.2006 um 04:14 schrieb Udo Richter:

> The 1.3.49 code shuts down if the recording shut down is confirmed  
> *OR* if the plugin shut down is confirmed. Unfortunately, if no  
> plugin has activity, this counts as confirmed, so VDR will shut  
> down no matter if recording shut down was confirmed or not.

Thanks, your patch brings back the usul behavior. I used to hit the  
poweroff key when a recording is running and i leave the house for  
example, VDR used to shut down then when the timer stopped. This does  
not work anymore, even with your patch. Any idea how to bring this back?

Ciao, Dominique
  
Dominique Simon April 29, 2006, 8:48 a.m. UTC | #2
Am 29.04.2006 um 10:40 schrieb Dominique Simon:

> Thanks, your patch brings back the usul behavior. I used to hit the  
> poweroff key when a recording is running and i leave the house for  
> example, VDR used to shut down then when the timer stopped. This  
> does not work anymore, even with your patch. Any idea how to bring  
> this back?
>

Sorry, VDR DOES shut down when the timer stopped and you pressed the  
poweroff key before. So your patch works flawlessly. I entered a  
wrong timer stop time in my first test ;)

Ciao, Dominique
  

Patch

--- vdr-1.3.49-orig/vdr.c	2006-04-28 15:23:55.000000000 +0200
+++ vdr-1.3.49/vdr.c	2006-04-29 03:20:25.876919696 +0200
@@ -976,14 +971,15 @@ 
                           Skins.Message(mtError, tr("Can't shutdown - option '-s' not given!"));
                           break;
                           }
-                       if (cRecordControls::Active()) {
-                          if (Interface->Confirm(tr("Recording - shut down anyway?")))
-                             ForceShutdown = true;
-                          }
-                       if (!cPluginManager::Active(tr("shut down anyway?")))
-                          ForceShutdown = true;
                        LastActivity = 1; // not 0, see below!
                        UserShutdown = true;
+                       if (cRecordControls::Active()) {
+                          if (!Interface->Confirm(tr("Recording - shut down anyway?")))
+                             break;
+                          }
+                       if (cPluginManager::Active(tr("shut down anyway?"))) 
+                          break;
+                       ForceShutdown = true;
                        break;
           default: break;
           }