comparison cli-tcpfwd.c @ 1025:02baa0b334e8 fastopen

async connections working
author Matt Johnston <matt@ucc.asn.au>
date Wed, 18 Feb 2015 22:46:15 +0800
parents 4121ca987e6a
children 0da8ba489c23
comparison
equal deleted inserted replaced
1024:aac0095dc3b4 1025:02baa0b334e8
252 origaddr, origport); 252 origaddr, origport);
253 goto out; 253 goto out;
254 } 254 }
255 255
256 snprintf(portstring, sizeof(portstring), "%d", fwd->connectport); 256 snprintf(portstring, sizeof(portstring), "%d", fwd->connectport);
257 sock = connect_remote(fwd->connectaddr, portstring, NULL); 257 channel->conn_pending = connect_remote(fwd->connectaddr, portstring, channel_connect_done, channel);
258 if (sock < 0) {
259 TRACE(("leave newtcpdirect: sock failed"))
260 err = SSH_OPEN_CONNECT_FAILED;
261 goto out;
262 }
263
264 ses.maxfd = MAX(ses.maxfd, sock);
265
266 /* We don't set readfd, that will get set after the connection's
267 * progress succeeds */
268 channel->writefd = sock;
269 channel->initconn = 1;
270 258
271 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE; 259 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;
272 260
273 err = SSH_OPEN_IN_PROGRESS; 261 err = SSH_OPEN_IN_PROGRESS;
274 262