diff cli-session.c @ 1032:0da8ba489c23 fastopen

Move generic network routines to netio.c
author Matt Johnston <matt@ucc.asn.au>
date Fri, 20 Feb 2015 23:16:38 +0800
parents 64c0aa01e2b6
children 01eea88963f3
line wrap: on
line diff
--- a/cli-session.c	Fri Feb 20 22:13:53 2015 +0800
+++ b/cli-session.c	Fri Feb 20 23:16:38 2015 +0800
@@ -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 @@
 
 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();
 }