diff options
author | Eduardo Chappa <chappa@washington.edu> | 2019-02-14 22:08:41 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2019-02-14 22:08:41 -0700 |
commit | 8ee1778a57c78b88e203ba20291d61d3e7cd0507 (patch) | |
tree | 8fee11f12d9788f28de85af9414e0a3b35eec851 | |
parent | 395d898e7467fb4c20fce618a3d14c0ec631557b (diff) | |
download | alpine-8ee1778a57c78b88e203ba20291d61d3e7cd0507.tar.xz |
* commit a43c686472a0... and 2e921f97bd1278a... were modified to
avoid delays in certain commands (for example, when sending a
message using the ^X command.)
-rw-r--r-- | alpine/status.c | 11 |
1 files 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); |