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-main.c | |
parent | 59bb1777be18b8f1b263aaeabe54a32933fc871d (diff) | |
parent | 89c0b2a6d863e54bd0253355146f09b92edeccda (diff) |
merge tcp fastopen
Diffstat (limited to 'cli-main.c')
-rw-r--r-- | cli-main.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -30,6 +30,7 @@ #include "session.h" #include "dbrandom.h" #include "crypto_desc.h" +#include "netio.h" static void cli_dropbear_exit(int exitcode, const char* format, va_list param) ATTRIB_NORETURN; static void cli_dropbear_log(int priority, const char* format, va_list param); @@ -46,7 +47,7 @@ int main(int argc, char ** argv) { #endif int sock_in, sock_out; - char* error = NULL; + struct dropbear_progress_connection *progress = NULL; _dropbear_exit = cli_dropbear_exit; _dropbear_log = cli_dropbear_log; @@ -72,15 +73,11 @@ int main(int argc, char ** argv) { } else #endif { - int sock = connect_remote(cli_opts.remotehost, cli_opts.remoteport, &error); - sock_in = sock_out = sock; + progress = connect_remote(cli_opts.remotehost, cli_opts.remoteport, cli_connected, &ses); + sock_in = sock_out = -1; } - if (sock_in < 0) { - dropbear_exit("%s", error); - } - - cli_session(sock_in, sock_out); + cli_session(sock_in, sock_out, progress); /* not reached */ return -1; |