mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Move echo/edit state change functionality out of ldisc_send.
I'm not actually sure why we've always had back ends notify ldisc of changes to echo/edit settings by giving ldisc_send(ldisc,NULL,0,0) a special meaning, instead of by having a separate dedicated notify function with its own prototype and parameter set. Coverity's recent observation that the two kinds of call don't even have the same requirements on the ldisc (particularly, whether ldisc->term can be NULL) makes me realise that it's really high time I separated the two conceptually different operations into actually different functions. While I'm here, I've renamed the confusing ldisc_update() function which that special operation ends up feeding to, because it's not actually a function applying to an ldisc - it applies to a front end. So ldisc_send(ldisc,NULL,0,0) is now ldisc_echoedit_update(ldisc), and that in turn figures out the current echo/edit settings before passing them on to frontend_echoedit_update(). I think that should be clearer.
This commit is contained in:
4
ssh.c
4
ssh.c
@ -5832,7 +5832,7 @@ static void do_ssh1_connection(Ssh ssh, unsigned char *in, int inlen,
|
||||
ssh_special(ssh, TS_EOF);
|
||||
|
||||
if (ssh->ldisc)
|
||||
ldisc_send(ssh->ldisc, NULL, 0, 0);/* cause ldisc to notice changes */
|
||||
ldisc_echoedit_update(ssh->ldisc); /* cause ldisc to notice changes */
|
||||
ssh->send_ok = 1;
|
||||
ssh->channels = newtree234(ssh_channelcmp);
|
||||
while (1) {
|
||||
@ -10326,7 +10326,7 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen,
|
||||
* Transfer data!
|
||||
*/
|
||||
if (ssh->ldisc)
|
||||
ldisc_send(ssh->ldisc, NULL, 0, 0);/* cause ldisc to notice changes */
|
||||
ldisc_echoedit_update(ssh->ldisc); /* cause ldisc to notice changes */
|
||||
if (ssh->mainchan)
|
||||
ssh->send_ok = 1;
|
||||
while (1) {
|
||||
|
Reference in New Issue
Block a user