Move generic network routines to netio.c

--HG--
branch : fastopen
This commit is contained in:
Matt Johnston
2015-02-20 23:16:38 +08:00
parent 1b1997bf2d
commit 364a53577e
16 changed files with 661 additions and 645 deletions

View File

@@ -37,6 +37,7 @@
#include "chansession.h"
#include "agentfwd.h"
#include "crypto_desc.h"
#include "netio.h"
static void cli_remoteclosed();
static void cli_sessionloop();
@@ -95,11 +96,11 @@ static const struct ChanType *cli_chantypes[] = {
void cli_connected(int result, int sock, void* userdata, const char *errstring)
{
if (result == DROPBEAR_FAILURE)
{
struct sshsession *myses = userdata;
if (result == DROPBEAR_FAILURE) {
dropbear_exit("Connect failed: %s", errstring);
}
ses.sock_in = ses.sock_out = sock;
myses->sock_in = myses->sock_out = sock;
update_channel_prio();
}