mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-20 04:28:07 -05:00
We should wait until the Rlogin server indicates that it's happy to receive
window-size notifications before we send them. This clears up a problem where the first password entry always failed. [originally from svn r5960]
This commit is contained in:
parent
ccedec116c
commit
bb95adf054
8
rlogin.c
8
rlogin.c
@ -20,6 +20,7 @@ typedef struct rlogin_tag {
|
|||||||
Socket s;
|
Socket s;
|
||||||
int bufsize;
|
int bufsize;
|
||||||
int firstbyte;
|
int firstbyte;
|
||||||
|
int cansize;
|
||||||
int term_width, term_height;
|
int term_width, term_height;
|
||||||
void *frontend;
|
void *frontend;
|
||||||
} *Rlogin;
|
} *Rlogin;
|
||||||
@ -73,8 +74,10 @@ static int rlogin_receive(Plug plug, int urgent, char *data, int len)
|
|||||||
|
|
||||||
c = *data++;
|
c = *data++;
|
||||||
len--;
|
len--;
|
||||||
if (c == '\x80')
|
if (c == '\x80') {
|
||||||
|
rlogin->cansize = 1;
|
||||||
rlogin_size(rlogin, rlogin->term_width, rlogin->term_height);
|
rlogin_size(rlogin, rlogin->term_width, rlogin->term_height);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* We should flush everything (aka Telnet SYNCH) if we see
|
* We should flush everything (aka Telnet SYNCH) if we see
|
||||||
* 0x02, and we should turn off and on _local_ flow control
|
* 0x02, and we should turn off and on _local_ flow control
|
||||||
@ -136,6 +139,7 @@ static const char *rlogin_init(void *frontend_handle, void **backend_handle,
|
|||||||
rlogin->term_width = cfg->width;
|
rlogin->term_width = cfg->width;
|
||||||
rlogin->term_height = cfg->height;
|
rlogin->term_height = cfg->height;
|
||||||
rlogin->firstbyte = 1;
|
rlogin->firstbyte = 1;
|
||||||
|
rlogin->cansize = 0;
|
||||||
*backend_handle = rlogin;
|
*backend_handle = rlogin;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -243,7 +247,7 @@ static void rlogin_size(void *handle, int width, int height)
|
|||||||
rlogin->term_width = width;
|
rlogin->term_width = width;
|
||||||
rlogin->term_height = height;
|
rlogin->term_height = height;
|
||||||
|
|
||||||
if (rlogin->s == NULL)
|
if (rlogin->s == NULL || !rlogin->cansize)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
b[6] = rlogin->term_width >> 8;
|
b[6] = rlogin->term_width >> 8;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user