Mercurial > dropbear
comparison common-channel.c @ 896:a1a97e98b0c1
Read (and enqueue) packets from interactive input even when
we're waiting for a key exchange.
This should hopefully fix the situation where "~." doesn't work to terminate a
client session when a laptop wakes up. The client will be stuck waiting for a
key exchange on a dead connection, so won't have read the escape character
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 17 Feb 2014 21:41:06 +0800 |
parents | 35183e8a7851 |
children | 4696755c4cac |
comparison
equal
deleted
inserted
replaced
895:5608a5a61c2a | 896:a1a97e98b0c1 |
---|---|
472 channel = ses.channels[i]; | 472 channel = ses.channels[i]; |
473 if (channel == NULL) { | 473 if (channel == NULL) { |
474 continue; | 474 continue; |
475 } | 475 } |
476 | 476 |
477 /* Stuff to put over the wire */ | 477 /* Stuff to put over the wire. |
478 if (channel->transwindow > 0) { | 478 Avoid queueing data to send if we're in the middle of a |
479 key re-exchange (!dataallowed), but still read from the | |
480 FD if there's the possibility of "~."" to kill an | |
481 interactive session (the read_mangler) */ | |
482 if (channel->transwindow > 0 | |
483 && (ses.dataallowed || channel->read_mangler)) { | |
479 | 484 |
480 if (channel->readfd >= 0) { | 485 if (channel->readfd >= 0) { |
481 FD_SET(channel->readfd, readfds); | 486 FD_SET(channel->readfd, readfds); |
482 } | 487 } |
483 | 488 |