mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-16 02:27:32 -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:
@ -587,7 +587,7 @@ static char *pfl_listen(const char *desthost, int destport,
|
||||
pl->cl = cl;
|
||||
|
||||
pl->s = new_listener(srcaddr, port, &pl->plug,
|
||||
!conf_get_int(conf, CONF_lport_acceptall),
|
||||
!conf_get_bool(conf, CONF_lport_acceptall),
|
||||
conf, address_family);
|
||||
if ((err = sk_socket_error(pl->s)) != NULL) {
|
||||
char *err_ret = dupstr(err);
|
||||
@ -1024,7 +1024,7 @@ void portfwdmgr_config(PortFwdManager *mgr, Conf *conf)
|
||||
|
||||
if (pfr->saddr) {
|
||||
shost = pfr->saddr;
|
||||
} else if (conf_get_int(conf, CONF_rport_acceptall)) {
|
||||
} else if (conf_get_bool(conf, CONF_rport_acceptall)) {
|
||||
shost = "";
|
||||
} else {
|
||||
shost = "localhost";
|
||||
|
Reference in New Issue
Block a user