diff options
author | Damien Miller <djm@mindrot.org> | 2002-01-22 23:28:13 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-01-22 23:28:13 +1100 |
commit | ebc11d30121c53316e5119ce3dfd0844dfcd0002 (patch) | |
tree | ac53e2208778049e571a8d432a7160d579651542 | |
parent | fcfc43b617e707a7f073c0241029341ed0ebe211 (diff) |
- markus@cvs.openbsd.org 2002/01/14 13:40:10
[nchan.c]
correct fn names for ssh2, do not switch from closed to closed; ok provos@
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | nchan.c | 13 |
2 files changed, 12 insertions, 8 deletions
@@ -169,7 +169,10 @@ | |||
169 | - markus@cvs.openbsd.org 2002/01/14 13:34:07 | 169 | - markus@cvs.openbsd.org 2002/01/14 13:34:07 |
170 | [nchan.c] | 170 | [nchan.c] |
171 | merge chan_[io]buf_empty[12]; ok provos@ | 171 | merge chan_[io]buf_empty[12]; ok provos@ |
172 | 172 | - markus@cvs.openbsd.org 2002/01/14 13:40:10 | |
173 | [nchan.c] | ||
174 | correct fn names for ssh2, do not switch from closed to closed; | ||
175 | ok provos@ | ||
173 | 176 | ||
174 | 20020121 | 177 | 20020121 |
175 | - (djm) Rework ssh-rand-helper: | 178 | - (djm) Rework ssh-rand-helper: |
@@ -7317,4 +7320,4 @@ | |||
7317 | - Wrote replacements for strlcpy and mkdtemp | 7320 | - Wrote replacements for strlcpy and mkdtemp |
7318 | - Released 1.0pre1 | 7321 | - Released 1.0pre1 |
7319 | 7322 | ||
7320 | $Id: ChangeLog,v 1.1770 2002/01/22 12:27:45 djm Exp $ | 7323 | $Id: ChangeLog,v 1.1771 2002/01/22 12:28:13 djm Exp $ |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: nchan.c,v 1.39 2002/01/14 13:34:07 markus Exp $"); | 26 | RCSID("$OpenBSD: nchan.c,v 1.40 2002/01/14 13:40:10 markus Exp $"); |
27 | 27 | ||
28 | #include "ssh1.h" | 28 | #include "ssh1.h" |
29 | #include "ssh2.h" | 29 | #include "ssh2.h" |
@@ -274,7 +274,7 @@ chan_send_oclose1(Channel *c) | |||
274 | * the same for SSH2 | 274 | * the same for SSH2 |
275 | */ | 275 | */ |
276 | static void | 276 | static void |
277 | chan_rcvd_oclose2(Channel *c) | 277 | chan_rcvd_close2(Channel *c) |
278 | { | 278 | { |
279 | debug("channel %d: rcvd close", c->self); | 279 | debug("channel %d: rcvd close", c->self); |
280 | if (c->flags & CHAN_CLOSE_RCVD) | 280 | if (c->flags & CHAN_CLOSE_RCVD) |
@@ -298,12 +298,13 @@ chan_rcvd_oclose2(Channel *c) | |||
298 | switch (c->istate) { | 298 | switch (c->istate) { |
299 | case CHAN_INPUT_OPEN: | 299 | case CHAN_INPUT_OPEN: |
300 | chan_shutdown_read(c); | 300 | chan_shutdown_read(c); |
301 | chan_set_istate(c, CHAN_INPUT_CLOSED); | ||
301 | break; | 302 | break; |
302 | case CHAN_INPUT_WAIT_DRAIN: | 303 | case CHAN_INPUT_WAIT_DRAIN: |
303 | chan_send_eof2(c); | 304 | chan_send_eof2(c); |
305 | chan_set_istate(c, CHAN_INPUT_CLOSED); | ||
304 | break; | 306 | break; |
305 | } | 307 | } |
306 | chan_set_istate(c, CHAN_INPUT_CLOSED); | ||
307 | } | 308 | } |
308 | static void | 309 | static void |
309 | chan_ibuf_empty2(Channel *c) | 310 | chan_ibuf_empty2(Channel *c) |
@@ -311,7 +312,7 @@ chan_ibuf_empty2(Channel *c) | |||
311 | chan_ibuf_empty1(c); | 312 | chan_ibuf_empty1(c); |
312 | } | 313 | } |
313 | static void | 314 | static void |
314 | chan_rcvd_ieof2(Channel *c) | 315 | chan_rcvd_eof2(Channel *c) |
315 | { | 316 | { |
316 | debug("channel %d: rcvd eof", c->self); | 317 | debug("channel %d: rcvd eof", c->self); |
317 | if (c->ostate == CHAN_OUTPUT_OPEN) | 318 | if (c->ostate == CHAN_OUTPUT_OPEN) |
@@ -446,11 +447,11 @@ void | |||
446 | chan_init(void) | 447 | chan_init(void) |
447 | { | 448 | { |
448 | if (compat20) { | 449 | if (compat20) { |
449 | chan_rcvd_oclose = chan_rcvd_oclose2; | 450 | chan_rcvd_oclose = chan_rcvd_close2; |
450 | chan_read_failed = chan_read_failed_12; | 451 | chan_read_failed = chan_read_failed_12; |
451 | chan_ibuf_empty = chan_ibuf_empty2; | 452 | chan_ibuf_empty = chan_ibuf_empty2; |
452 | 453 | ||
453 | chan_rcvd_ieof = chan_rcvd_ieof2; | 454 | chan_rcvd_ieof = chan_rcvd_eof2; |
454 | chan_write_failed = chan_write_failed2; | 455 | chan_write_failed = chan_write_failed2; |
455 | chan_obuf_empty = chan_obuf_empty2; | 456 | chan_obuf_empty = chan_obuf_empty2; |
456 | } else { | 457 | } else { |