mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Remove FLAG_INTERACTIVE.
This is simpler than FLAG_VERBOSE: everywhere we need to check it, we have a Seat available, so we can just make it a Seat query method.
This commit is contained in:
@ -400,6 +400,7 @@ static const SeatVtable gtk_seat_vt = {
|
||||
gtk_seat_stripctrl_new,
|
||||
gtk_seat_set_trust_status,
|
||||
nullseat_verbose_yes,
|
||||
nullseat_interactive_yes,
|
||||
};
|
||||
|
||||
static void gtk_eventlog(LogPolicy *lp, const char *string)
|
||||
|
@ -380,6 +380,13 @@ static int plink_get_userpass_input(Seat *seat, prompts_t *p, bufchain *input)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool plink_seat_interactive(Seat *seat)
|
||||
{
|
||||
return (!*conf_get_str(conf, CONF_remote_cmd) &&
|
||||
!*conf_get_str(conf, CONF_remote_cmd2) &&
|
||||
!*conf_get_str(conf, CONF_ssh_nc_host));
|
||||
}
|
||||
|
||||
static const SeatVtable plink_seat_vt = {
|
||||
plink_output,
|
||||
plink_eof,
|
||||
@ -400,6 +407,7 @@ static const SeatVtable plink_seat_vt = {
|
||||
console_stripctrl_new,
|
||||
console_set_trust_status,
|
||||
cmdline_seat_verbose,
|
||||
plink_seat_interactive,
|
||||
};
|
||||
static Seat plink_seat[1] = {{ &plink_seat_vt }};
|
||||
|
||||
@ -739,11 +747,6 @@ int main(int argc, char **argv)
|
||||
if (use_subsystem)
|
||||
conf_set_bool(conf, CONF_ssh_subsys, true);
|
||||
|
||||
if (!*conf_get_str(conf, CONF_remote_cmd) &&
|
||||
!*conf_get_str(conf, CONF_remote_cmd2) &&
|
||||
!*conf_get_str(conf, CONF_ssh_nc_host))
|
||||
flags |= FLAG_INTERACTIVE;
|
||||
|
||||
/*
|
||||
* Select protocol. This is farmed out into a table in a
|
||||
* separate file to enable an ssh-free variant.
|
||||
|
@ -80,7 +80,6 @@ const bool share_can_be_upstream = true;
|
||||
void setup(bool single)
|
||||
{
|
||||
sk_init();
|
||||
flags = FLAG_INTERACTIVE;
|
||||
cmdline_tooltype |= TOOLTYPE_HOST_ARG | TOOLTYPE_PORT_ARG |
|
||||
TOOLTYPE_NO_VERBOSE_OPTION;
|
||||
default_protocol = be_default_protocol;
|
||||
|
Reference in New Issue
Block a user