John Horne
2000-Nov-15 14:31 UTC
[PATCH]: nchan.c : internal error: we do not read, but chan_read
Attached is the patch I've been using to fix the error message seen in the
subject line. It seems (!) to have caused no problems with the
previous openssh snapshot version openssh-SNAP-20001016, 2.3.0p1 and the
latest snapshot (openssh-SNAP-20001114).
The patch adds 3 lines to nchan.c in a switch stmt (line 100). It simply
caters for the cases where the input channel state is CHAN_INPUT_WAIT_DRAIN
or CHAN_INPUT_CLOSED. In these cases it simply exits (breaks) from the switch
stmt. This seems to be necessary now because an earlier fix caused nchan to
be called twice when closing a session. The first time is okay, but the
second (with the channel now in one of the above states) causes the error
message.
John.
------------------------------------------------------------------------
John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914
E-mail: jhorne at plymouth.ac.uk
PGP key available from public key servers
-------------- next part --------------
*** nchan.c.orig Wed Nov 15 12:50:04 2000
--- nchan.c Wed Nov 15 12:53:17 2000
***************
*** 98,103 ****
--- 98,106 ----
{
debug("channel %d: read failed", c->self);
switch (c->istate) {
+ case CHAN_INPUT_WAIT_DRAIN:
+ case CHAN_INPUT_CLOSED:
+ break;
case CHAN_INPUT_OPEN:
debug("channel %d: input open -> drain", c->self);
chan_shutdown_read(c);
Rob Hagopian
2000-Nov-23 02:28 UTC
[PATCH]: nchan.c : internal error: we do not read, but chan_read
I haven't seen further about this patch - is this expected to go into the next version? -Rob On Wed, 15 Nov 2000, John Horne wrote:> Attached is the patch I've been using to fix the error message seen in the > subject line. It seems (!) to have caused no problems with the > previous openssh snapshot version openssh-SNAP-20001016, 2.3.0p1 and the > latest snapshot (openssh-SNAP-20001114). > > The patch adds 3 lines to nchan.c in a switch stmt (line 100). It simply > caters for the cases where the input channel state is CHAN_INPUT_WAIT_DRAIN > or CHAN_INPUT_CLOSED. In these cases it simply exits (breaks) from the switch > stmt. This seems to be necessary now because an earlier fix caused nchan to > be called twice when closing a session. The first time is okay, but the > second (with the channel now in one of the above states) causes the error > message. > > John. > > ------------------------------------------------------------------------ > John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 > E-mail: jhorne at plymouth.ac.uk > PGP key available from public key servers >