1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 20:12:48 -05:00

First stab at the ability to compile puttytel.exe, an SSH-free

variant which is patent-safe in the US and legal in France and
Russia. This is a horrible hack in some ways: it's shown up serious
deficiencies in the module boundaries. Needs further work, probably
once the SSH implementations are recombined.

[originally from svn r410]
This commit is contained in:
Simon Tatham
2000-03-15 15:08:48 +00:00
parent 7aa84c296f
commit 96dbf9c6e6
11 changed files with 190 additions and 57 deletions

View File

@ -186,9 +186,25 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
}
}
back = (cfg.protocol == PROT_SSH ? &ssh_backend :
cfg.protocol == PROT_TELNET ? &telnet_backend :
&raw_backend);
/*
* Select protocol. This is farmed out into a table in a
* separate file to enable an ssh-free variant.
*/
{
int i;
back = NULL;
for (i = 0; backends[i].backend != NULL; i++)
if (backends[i].protocol == cfg.protocol) {
back = backends[i].backend;
break;
}
if (back == NULL) {
MessageBox(NULL, "Unsupported protocol number found",
"PuTTY Internal Error", MB_OK | MB_ICONEXCLAMATION);
WSACleanup();
return 1;
}
}
ldisc = (cfg.ldisc_term ? &ldisc_term : &ldisc_simple);