1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Bug fix: line discipline selection is not enabled until after ssh

authentication phase to stop user/password prompts behaving oddly

[originally from svn r614]
This commit is contained in:
Simon Tatham
2000-09-22 13:10:19 +00:00
parent e5ef37f3f5
commit c0ac8ab9b4
7 changed files with 37 additions and 5 deletions

13
plink.c
View File

@ -32,12 +32,19 @@ void connection_fatal (char *p, ...) {
}
HANDLE outhandle;
DWORD orig_console_mode;
void begin_session(void) {
if (!cfg.ldisc_term)
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_PROCESSED_INPUT);
else
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), orig_console_mode);
}
void term_out(void)
{
int reap;
DWORD ret;
reap = 0;
while (reap < inbuf_head) {
if (!WriteFile(outhandle, inbuf+reap, inbuf_head-reap, &ret, NULL))
@ -277,8 +284,8 @@ int main(int argc, char **argv) {
netevent = CreateEvent(NULL, FALSE, FALSE, NULL);
stdinevent = CreateEvent(NULL, FALSE, FALSE, NULL);
if (!cfg.ldisc_term)
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_PROCESSED_INPUT);
GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &orig_console_mode);
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_PROCESSED_INPUT);
outhandle = GetStdHandle(STD_OUTPUT_HANDLE);
/*