1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Fix subtle problem with scp protocol/port selection

[originally from svn r505]
This commit is contained in:
Simon Tatham 2000-06-23 09:44:15 +00:00
parent 41809f16a0
commit 6d6ab0cc39

View File

@ -117,7 +117,7 @@ static void save_settings (char *section, int do_host) {
wpps (sesskey, "HostName", cfg.host); wpps (sesskey, "HostName", cfg.host);
wppi (sesskey, "PortNumber", cfg.port); wppi (sesskey, "PortNumber", cfg.port);
p = "raw"; p = "raw";
for (i = 0; backends[i].backend != NULL; i++) for (i = 0; backends[i].name != NULL; i++)
if (backends[i].protocol == cfg.protocol) { if (backends[i].protocol == cfg.protocol) {
p = backends[i].name; p = backends[i].name;
break; break;
@ -243,7 +243,7 @@ static void load_settings (char *section, int do_host) {
gpps (sesskey, "Protocol", "default", prot, 10); gpps (sesskey, "Protocol", "default", prot, 10);
cfg.protocol = default_protocol; cfg.protocol = default_protocol;
for (i = 0; backends[i].backend != NULL; i++) for (i = 0; backends[i].name != NULL; i++)
if (!strcmp(prot, backends[i].name)) { if (!strcmp(prot, backends[i].name)) {
cfg.protocol = backends[i].protocol; cfg.protocol = backends[i].protocol;
break; break;