1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-23 05:55:04 -05:00

Patch from RDB: in the case where the protocol read from the

settings file is unrecognised (i.e. PuTTYtel reading PuTTY's
registry), fall back to the default _port_ as well as the default
protocol.

[originally from svn r1242]
This commit is contained in:
Simon Tatham 2001-09-07 22:45:05 +00:00
parent e1ecb1c61e
commit eebec27c99

View File

@ -291,7 +291,6 @@ void load_settings(char *section, int do_host, Config * cfg)
cfg->remote_cmd_ptr2 = NULL;
gpps(sesskey, "HostName", "", cfg->host, sizeof(cfg->host));
gppi(sesskey, "PortNumber", default_port, &cfg->port);
gpps(sesskey, "LogFileName", "putty.log",
cfg->logfilename, sizeof(cfg->logfilename));
gppi(sesskey, "LogType", 0, &cfg->logtype);
@ -299,9 +298,11 @@ void load_settings(char *section, int do_host, Config * cfg)
gpps(sesskey, "Protocol", "default", prot, 10);
cfg->protocol = default_protocol;
cfg->port = default_port;
for (i = 0; backends[i].name != NULL; i++)
if (!strcmp(prot, backends[i].name)) {
cfg->protocol = backends[i].protocol;
gppi(sesskey, "PortNumber", default_port, &cfg->port);
break;
}