Ticket #6066: 6060_2.diff

File 6060_2.diff, 1008 bytes (added by laga, 10 years ago)

Patch against Mythwelcome.

  • programs/mythshutdown/main.cpp

     
    522522    {
    523523        int delta = dtCurrent.secsTo(dtNextRecordingStart);
    524524
    525         if (delta < 0)
     525        if (delta < 0 && delta > -100) {
     526            // We were supposed to wake up less than 100s ago.
     527            // We have good reason to believe we should be awake and recording something
     528            // So let's just not shut down.
     529            // This also gives the backend the chance to set a new (valid) wakeup time
     530            VERBOSE(VB_IMPORTANT, "Shutdown aborted."
     531                                  " Recording was supposed to start < 100s ago");
     532            return 1;
     533        }
     534        else if (delta < -100)
    526535        {
    527536            VERBOSE(VB_IMPORTANT, "Scheduled recording time has"
    528537                                  " already passed. Schedule deleted");