summaryrefslogtreecommitdiff
path: root/pith/conf.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-05-27 15:48:21 -0600
committerEduardo Chappa <chappa@washington.edu>2018-05-27 15:48:21 -0600
commit2e72300b0d571c2b319e0e5c827ddc45f011f964 (patch)
tree1ab904e5965602e4565497dd51bc3af2a46681da /pith/conf.c
parentae67ebf820817f01e77471b5bc7da9885b159bba (diff)
downloadalpine-2e72300b0d571c2b319e0e5c827ddc45f011f964.tar.xz
* Add new variable close-connection-timeout, which tells Alpine to close
a connection that is having problems being kept alive after the number of seconds configured in this variable, if the connection has not recovered. The default is 0, which means to keep the connection alive and wait for the connection to recover.
Diffstat (limited to 'pith/conf.c')
-rw-r--r--pith/conf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pith/conf.c b/pith/conf.c
index 2c7ac77b..b75d8891 100644
--- a/pith/conf.c
+++ b/pith/conf.c
@@ -390,6 +390,8 @@ CONF_TXT_T cf_text_tcp_write_timeo[] = "Network write warning timeout. The defau
CONF_TXT_T cf_text_tcp_query_timeo[] = "If this much time has elapsed at the time of a tcp read or write\n# timeout, Alpine will ask if you want to break the connection.\n# Default is 60 seconds, minimum is 5, maximum is 1000.";
+CONF_TXT_T cf_text_close_connection_timeo[] = "If this much time has elapsed at the time of a tcp read or write timeout,\n# Alpine will close the connection automatically without user intervention.\n# Setting this value to zero (the default) disables this. Setting this variable\n# to a smaller value than tcp-query-timeout will close the connection\n# automatically, and you will never be asked if you want to wait.";
+
CONF_TXT_T cf_text_rsh_open_timeo[] = "Sets the time in seconds that Alpine will attempt to open a UNIX remote\n# shell connection. The default is 15, min is 5, and max is unlimited.\n# Zero disables rsh altogether.";
CONF_TXT_T cf_text_rsh_path[] = "Sets the name of the command used to open a UNIX remote shell connection.\n# The default is typically /usr/ucb/rsh.";
@@ -721,6 +723,8 @@ static struct variable variables[] = {
"TCP Write Warning Timeout", cf_text_tcp_write_timeo},
{"tcp-query-timeout", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
"TCP Query Timeout", cf_text_tcp_query_timeo},
+{"close-connection-timeout", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
+ NULL, cf_text_close_connection_timeo},
{"rsh-command", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
NULL, cf_text_rsh_command},
{"rsh-path", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
@@ -2287,6 +2291,13 @@ init_vars(struct pine *ps, void (*cmds_f) (struct pine *, char **))
else
ps->tcp_query_timeout = i;
+ set_current_val(&vars[V_QUITQUERYTIMEO], TRUE, TRUE);
+ ps->close_connection_timeout = i = 0;
+ if(VAR_QUITQUERYTIMEO && SVAR_QUIT_QUERY_TIMEO(ps, i, tmp_20k_buf, SIZEOF_20KBUF))
+ init_error(ps, SM_ORDER | SM_DING, 3, 5, tmp_20k_buf);
+ else
+ ps->close_connection_timeout = i;
+
set_current_val(&vars[V_NEWSRC_PATH], TRUE, TRUE);
if(VAR_NEWSRC_PATH && VAR_NEWSRC_PATH[0])
mail_parameters(NULL, SET_NEWSRC, (void *)VAR_NEWSRC_PATH);