1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 17:47:33 -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

View File

@ -256,7 +256,7 @@ PacketProtocolLayer *ssh2_connection_new(
* any at all channels (because our purpose is probably to be a
* background port forwarder).
*/
s->persistent = conf_get_int(s->conf, CONF_ssh_no_shell);
s->persistent = conf_get_bool(s->conf, CONF_ssh_no_shell);
s->connshare = connshare;
s->peer_verstring = dupstr(peer_verstring);
@ -1526,7 +1526,7 @@ static int ssh2_agent_forwarding_permitted(ConnectionLayer *cl)
{
struct ssh2_connection_state *s =
container_of(cl, struct ssh2_connection_state, cl);
return conf_get_int(s->conf, CONF_agentfwd) && agent_exists();
return conf_get_bool(s->conf, CONF_agentfwd) && agent_exists();
}
static int ssh2_connection_get_specials(