summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2019-01-01 14:25:22 -0700
committerEduardo Chappa <chappa@washington.edu>2019-01-01 14:25:22 -0700
commit2e921f97bd1278a800acadcea21dbf7bf58ea51c (patch)
treed40e99180c6e35da06fd85b05eb8a460eedff78c
parent69950995bed9305ebc6dabab64f017b544bc8f1e (diff)
downloadalpine-2e921f97bd1278a800acadcea21dbf7bf58ea51c.tar.xz
* 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.
-rw-r--r--alpine/status.c9
-rw-r--r--pith/pine.hlp5
2 files changed, 14 insertions, 0 deletions
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:
<LI> 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.
+
+ <LI> 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.
</UL>
<P>