summaryrefslogtreecommitdiffhomepage
path: root/cli-tcpfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-02-18 22:46:15 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-02-18 22:46:15 +0800
commit755c1458f0197d4da1dcb86ac832a8ffa8d02b27 (patch)
treecebef8bd66e3998f615939be9e6a4e3f78f3b255 /cli-tcpfwd.c
parent8795d733ecd27ef7aa1cc5d9e68b5ecb5a90f64e (diff)
async connections working
--HG-- branch : fastopen
Diffstat (limited to 'cli-tcpfwd.c')
-rw-r--r--cli-tcpfwd.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/cli-tcpfwd.c b/cli-tcpfwd.c
index 3894044..3e87ffd 100644
--- a/cli-tcpfwd.c
+++ b/cli-tcpfwd.c
@@ -254,19 +254,7 @@ static int newtcpforwarded(struct Channel * channel) {
}
snprintf(portstring, sizeof(portstring), "%d", fwd->connectport);
- sock = connect_remote(fwd->connectaddr, portstring, NULL);
- if (sock < 0) {
- TRACE(("leave newtcpdirect: sock failed"))
- err = SSH_OPEN_CONNECT_FAILED;
- goto out;
- }
-
- ses.maxfd = MAX(ses.maxfd, sock);
-
- /* We don't set readfd, that will get set after the connection's
- * progress succeeds */
- channel->writefd = sock;
- channel->initconn = 1;
+ channel->conn_pending = connect_remote(fwd->connectaddr, portstring, channel_connect_done, channel);
channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;