From 2e921f97bd1278a800acadcea21dbf7bf58ea51c Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Tue, 1 Jan 2019 14:25:22 -0700 Subject: [PATCH] * When there are time changes in the clock, Alpine might go to sleep for big amounts of time while displaying messages in the screen. Reset sleep time to 5 seconds in case it finds it needs to sleep more than 5 seconds or a negative amount of time. --- alpine/status.c | 9 +++++++++ pith/pine.hlp | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/alpine/status.c b/alpine/status.c index 1c5d359..fcfcdfd 100644 --- a/alpine/status.c +++ b/alpine/status.c @@ -229,6 +229,15 @@ pause_for_and_dq_cur_msg(void) if((w = status_message_remaining_nolock()) != 0){ delay_cmd_cue(1); + /* protect user from changes in the clock. If the clock + * changes during this process (for example, going from + * Standard time to Delayed time) this may result in big + * values for w. In those cases, reset w. + */ + if(w < 0 || w > 5){ /* maximum wait time is 5 seconds */ + w = 5; + displayed_time = time(0); + } sleep(w); delay_cmd_cue(0); } diff --git a/pith/pine.hlp b/pith/pine.hlp index 138b105..3709c3a 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -298,6 +298,11 @@ Bugs that have been addressed include:
  • S/MIME: A message could fail to verify its signature even if the certificate was saved when the message was open. Based on a report by David Woodhouse to the RedHat bugzilla system. + +
  • When there are time changes in the clock, Alpine might go to sleep + for big amounts of time while displaying messages in the screen. + Reset sleep time to 5 seconds in case it finds it needs to sleep + more than 5 seconds or a negative amount of time.

    -- 2.11.4.GIT