how to stop timer?

Message ID 43D20757.8080504@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger Jan. 21, 2006, 10:05 a.m. UTC
  Klaus Schmidinger wrote:
> Klaus Schmidinger wrote:
> 
>> ...
>>
>>> After some more thinking I believe cRecordControls::Start() actually
>>> is the better place for this check, since it is called several times.
>>>
>>> Please try the attached patch.
> 
> 
> It just crossed my mind that with the previous modification
> it would no longer be possible for a timer with a higher
> priority to force deletion of existing recordings with
> lower priority. Therefore the attached patch (to be applied
> after the previous one) makes sure AssertFreeDiskSpace()
> is called before checking for free disk space.

Ok, one more small detail:




Otherwise AssertFreeDiskSpace() would issue too many messages.

Since my disk is normally not full, it's hard for me to test
this under real live conditions. So maybe somebody with a
notoriously full disk should do some testing here.

Klaus
  

Comments

Markus Hahn Jan. 24, 2006, 7:33 p.m. UTC | #1
Am Samstag, 21. Januar 2006 11:05 schrieb Klaus Schmidinger:


> Since my disk is normally not full, it's hard for me to test
> this under real live conditions. So maybe somebody with a
> notoriously full disk should do some testing here.

thank you, Klaus for  fast patches. 
I do the tests on a smaller partition with 100% use: /export/nospace


The patch does a good job, but sometimes, if timerStat is set to 11
apears the message   constantly   "Low disk space". 
If that happend, user interaction is not possible anymore. 


regards markus
  

Patch

--- menu.c      2006/01/20 17:19:46     1.398
+++ menu.c      2006/01/21 10:02:19
@@ -3524,8 +3524,10 @@ 
  {
    static time_t LastNoDiskSpaceMessage = 0;
    int FreeMB = 0;
-  if (Timer)
-     AssertFreeDiskSpace(Timer->Priority(), true);
+  if (Timer) {
+     AssertFreeDiskSpace(Timer->Priority(), !Timer->Pending());
+     Timer->SetPending(true);
+     }
    VideoDiskSpace(&FreeMB);
    if (FreeMB < MINFREEDISK) {
       if (!Timer || time(NULL) - LastNoDiskSpaceMessage > NODISKSPACEDELTA) {