Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
Patch from RDB: in the case where the protocol read from the
Browse files Browse the repository at this point in the history
settings file is unrecognised (i.e. PuTTYtel reading PuTTY's
registry), fall back to the default _port_ as well as the default
protocol.


git-svn-id: svn://svn.tartarus.org/sgt/putty@1242 cda61777-01e9-0310-a592-d414129be87e
  • Loading branch information
simon committed Sep 7, 2001
1 parent ca3ab3e commit 1ff52e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,18 @@ 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);
gppi(sesskey, "LogFileClash", LGXF_ASK, &cfg->logxfovr);

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;
}

Expand Down

0 comments on commit 1ff52e1

Please sign in to comment.