Fix regression where TTY modes weren't reset for client

This commit is contained in:
Matt Johnston 2019-03-24 20:41:02 +08:00
parent e9231f73c2
commit 7bc6280613

View File

@ -35,7 +35,7 @@
#include "chansession.h" #include "chansession.h"
#include "agentfwd.h" #include "agentfwd.h"
static void cli_cleanupchansess(const struct Channel *channel); static void cli_closechansess(const struct Channel *channel);
static int cli_initchansess(struct Channel *channel); static int cli_initchansess(struct Channel *channel);
static void cli_chansessreq(struct Channel *channel); static void cli_chansessreq(struct Channel *channel);
static void send_chansess_pty_req(const struct Channel *channel); static void send_chansess_pty_req(const struct Channel *channel);
@ -51,8 +51,8 @@ const struct ChanType clichansess = {
cli_initchansess, /* inithandler */ cli_initchansess, /* inithandler */
NULL, /* checkclosehandler */ NULL, /* checkclosehandler */
cli_chansessreq, /* reqhandler */ cli_chansessreq, /* reqhandler */
NULL, /* closehandler */ cli_closechansess, /* closehandler */
cli_cleanupchansess, /* cleanup */ NULL, /* cleanup */
}; };
static void cli_chansessreq(struct Channel *channel) { static void cli_chansessreq(struct Channel *channel) {
@ -84,7 +84,7 @@ out:
/* If the main session goes, we close it up */ /* If the main session goes, we close it up */
static void cli_cleanupchansess(const struct Channel *UNUSED(channel)) { static void cli_closechansess(const struct Channel *UNUSED(channel)) {
cli_tty_cleanup(); /* Restore tty modes etc */ cli_tty_cleanup(); /* Restore tty modes etc */
/* This channel hasn't gone yet, so we have > 1 */ /* This channel hasn't gone yet, so we have > 1 */
@ -388,8 +388,8 @@ static const struct ChanType cli_chan_netcat = {
cli_init_netcat, /* inithandler */ cli_init_netcat, /* inithandler */
NULL, NULL,
NULL, NULL,
cli_closechansess,
NULL, NULL,
cli_cleanupchansess
}; };
void cli_send_netcat_request() { void cli_send_netcat_request() {