diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-02-28 23:24:30 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-02-28 23:24:30 +0800 |
commit | 125a970d71d5b43b7b648412fcc614e782c42a1d (patch) | |
tree | 8bbc278b055fd573a9d40ba171d9031626551371 /cli-session.c | |
parent | 59bb1777be18b8f1b263aaeabe54a32933fc871d (diff) | |
parent | 89c0b2a6d863e54bd0253355146f09b92edeccda (diff) |
merge tcp fastopen
Diffstat (limited to 'cli-session.c')
-rw-r--r-- | cli-session.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cli-session.c b/cli-session.c index 6be8472..815f5b6 100644 --- a/cli-session.c +++ b/cli-session.c @@ -37,6 +37,7 @@ #include "chansession.h" #include "agentfwd.h" #include "crypto_desc.h" +#include "netio.h" static void cli_remoteclosed() ATTRIB_NORETURN; static void cli_sessionloop(); @@ -93,15 +94,30 @@ static const struct ChanType *cli_chantypes[] = { NULL /* Null termination */ }; -void cli_session(int sock_in, int sock_out) { +void cli_connected(int result, int sock, void* userdata, const char *errstring) +{ + struct sshsession *myses = userdata; + if (result == DROPBEAR_FAILURE) { + dropbear_exit("Connect failed: %s", errstring); + } + myses->sock_in = myses->sock_out = sock; + update_channel_prio(); +} + +void cli_session(int sock_in, int sock_out, struct dropbear_progress_connection *progress) { common_session_init(sock_in, sock_out); + if (progress) { + connect_set_writequeue(progress, &ses.writequeue); + } + chaninitialise(cli_chantypes); /* Set up cli_ses vars */ cli_session_init(); + /* Ready to go */ sessinitdone = 1; |