1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 20:12:48 -05:00

Switch some Conf settings over to being bool.

I think this is the full set of things that ought logically to be
boolean.

One annoyance is that quite a few radio-button controls in config.c
address Conf fields that are now bool rather than int, which means
that the shared handler function can't just access them all with
conf_{get,set}_int. Rather than back out the rigorous separation of
int and bool in conf.c itself, I've just added a similar alternative
handler function for the bool-typed ones.
This commit is contained in:
Simon Tatham
2018-10-29 19:57:31 +00:00
parent 5691805cbd
commit 1378bb049a
31 changed files with 658 additions and 578 deletions

14
psftp.c
View File

@ -2761,9 +2761,9 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
* things like SCP and SFTP: agent forwarding, port forwarding,
* X forwarding.
*/
conf_set_int(conf, CONF_x11_forward, 0);
conf_set_int(conf, CONF_agentfwd, 0);
conf_set_int(conf, CONF_ssh_simple, true);
conf_set_bool(conf, CONF_x11_forward, false);
conf_set_bool(conf, CONF_agentfwd, false);
conf_set_bool(conf, CONF_ssh_simple, true);
{
char *key;
while ((key = conf_get_str_nthstrkey(conf, CONF_portfwd, 0)) != NULL)
@ -2772,8 +2772,8 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
/* Set up subsystem name. */
conf_set_str(conf, CONF_remote_cmd, "sftp");
conf_set_int(conf, CONF_ssh_subsys, true);
conf_set_int(conf, CONF_nopty, true);
conf_set_bool(conf, CONF_ssh_subsys, true);
conf_set_bool(conf, CONF_nopty, true);
/*
* Set up fallback option, for SSH-1 servers or servers with the
@ -2798,7 +2798,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
"test -x /usr/local/lib/sftp-server &&"
" exec /usr/local/lib/sftp-server\n"
"exec sftp-server");
conf_set_int(conf, CONF_ssh_subsys2, false);
conf_set_bool(conf, CONF_ssh_subsys2, false);
logctx = log_init(default_logpolicy, conf);
@ -2808,7 +2808,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
conf_get_str(conf, CONF_host),
conf_get_int(conf, CONF_port),
&realhost, 0,
conf_get_int(conf, CONF_tcp_keepalives));
conf_get_bool(conf, CONF_tcp_keepalives));
if (err != NULL) {
fprintf(stderr, "ssh_init: %s\n", err);
return 1;