comparison svr-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
268 TRACE(("leave newtcpdirect: port > 65535")) 268 TRACE(("leave newtcpdirect: port > 65535"))
269 goto out; 269 goto out;
270 } 270 }
271 271
272 snprintf(portstring, sizeof(portstring), "%d", destport); 272 snprintf(portstring, sizeof(portstring), "%d", destport);
273 sock = connect_remote(desthost, portstring, NULL); 273 channel->conn_pending = connect_remote(desthost, portstring, channel_connect_done, channel);
274 if (sock < 0) {
275 err = SSH_OPEN_CONNECT_FAILED;
276 TRACE(("leave newtcpdirect: sock failed"))
277 goto out;
278 }
279
280 ses.maxfd = MAX(ses.maxfd, sock);
281
282 /* We don't set readfd, that will get set after the connection's
283 * progress succeeds */
284 channel->writefd = sock;
285 channel->initconn = 1;
286 274
287 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE; 275 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;
288 276
289 err = SSH_OPEN_IN_PROGRESS; 277 err = SSH_OPEN_IN_PROGRESS;
290 278