From 8ee1778a57c78b88e203ba20291d61d3e7cd0507 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 14 Feb 2019 22:08:41 -0700 Subject: * commit a43c686472a0... and 2e921f97bd1278a... were modified to avoid delays in certain commands (for example, when sending a message using the ^X command.) --- alpine/status.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/alpine/status.c b/alpine/status.c index b28982b3..ffdbf95e 100644 --- a/alpine/status.c +++ b/alpine/status.c @@ -234,10 +234,7 @@ pause_for_and_dq_cur_msg(void) * 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); - } + w = (w > 0 ? (w > 5 ? 5 : w) : 0); sleep(w); delay_cmd_cue(0); } @@ -258,11 +255,7 @@ pause_for_and_mark_specific_msg(SMQ_T *msg) int w; w = (int) (displayed_time - time(0)) + msg->min_display_time; - if (w < 0 || w > 5){ - w = msg->min_display_time > 5 ? 5 : msg->min_display_time; - displayed_time = time(0); - } - w = (w > 0) ? w : 0; + w = (w > 0) ? (w > 5 ? 5 : w): 0; if(w){ delay_cmd_cue(1); sleep(w); -- cgit v1.2.3-54-g00ecf