diff options
author | Eduardo Chappa <chappa@washington.edu> | 2013-06-22 21:56:04 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2013-06-22 21:56:04 -0600 |
commit | c9e90d3c705c2a2636a24626c5d52e624f91e6e7 (patch) | |
tree | 5386bcff1398606b8f2238d94f97074a91bb4976 /alpine/imap.c | |
parent | e4b35478c8b3ce7352a74b2fea0e067f068daf18 (diff) | |
download | alpine-c9e90d3c705c2a2636a24626c5d52e624f91e6e7.tar.xz |
* fix crushing bug when Alpine bails on read error during a tcp timeout.
Diffstat (limited to 'alpine/imap.c')
-rw-r--r-- | alpine/imap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/alpine/imap.c b/alpine/imap.c index 074b9f6d..fa5f94a5 100644 --- a/alpine/imap.c +++ b/alpine/imap.c @@ -1223,6 +1223,7 @@ pine_tcptimeout_noscreen(long int elapsed, long int sincelast, char *host) } } + ps_global->tcptimeout = 0; return(rv); } @@ -1243,6 +1244,7 @@ pine_tcptimeout(long int elapsed, long int sincelast, char *host) long rv = 1L; /* keep trying by default */ unsigned long ch; + ps_global->tcptimeout = 1; #ifdef DEBUG dprint((1, "tcptimeout: waited %s seconds\n", long2string(elapsed))); @@ -1282,7 +1284,8 @@ pine_tcptimeout(long int elapsed, long int sincelast, char *host) fflush(stdout); flush_input(); ch = read_char(7); - if(ch == 'y' || ch == 'Y'){ + if(ps_global->read_bail || ch == 'y' || ch == 'Y'){ + ps_global->read_bail = 0; ps_global->user_says_cancel = 1; rv = 0L; } @@ -1303,6 +1306,7 @@ pine_tcptimeout(long int elapsed, long int sincelast, char *host) mark_status_dirty(); /* make sure it get's cleared */ resume_busy_cue((rv == 1) ? 3 : 0); + ps_global->tcptimeout = 0; return(rv); } |