summaryrefslogtreecommitdiff
path: root/nchan.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-05-05 04:09:47 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-05-05 04:09:47 +0000
commit99c73b377a45d3e008e73cca9073dc006e1cfaae (patch)
treeb2b33909e71916ba176521d28663d90fc8b40fc4 /nchan.c
parentc8cb8c0405db1f83bd8f97224f69db6a828cc94f (diff)
- markus@cvs.openbsd.org 2001/05/04 23:47:34
[channels.c channels.h clientloop.c nchan.c nchan.h serverloop.c ssh.c] move to Channel **channels (instead of Channel *channels), fixes realloc problems. channel_new now returns a Channel *, favour Channel * over channel id. remove old channel_allocate interface.
Diffstat (limited to 'nchan.c')
-rw-r--r--nchan.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/nchan.c b/nchan.c
index 77e4ef486..f4606e07f 100644
--- a/nchan.c
+++ b/nchan.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: nchan.c,v 1.23 2001/02/28 08:54:55 markus Exp $"); 26RCSID("$OpenBSD: nchan.c,v 1.24 2001/05/04 23:47:34 markus Exp $");
27 27
28#include "ssh1.h" 28#include "ssh1.h"
29#include "ssh2.h" 29#include "ssh2.h"
@@ -391,9 +391,17 @@ chan_send_close2(Channel *c)
391 391
392/* shared */ 392/* shared */
393 393
394void
395chan_mark_dead(Channel *c)
396{
397 c->flags |= CHAN_DEAD;
398}
399
394int 400int
395chan_is_dead(Channel *c) 401chan_is_dead(Channel *c)
396{ 402{
403 if (c->flags & CHAN_DEAD)
404 return 1;
397 if (c->istate != CHAN_INPUT_CLOSED || c->ostate != CHAN_OUTPUT_CLOSED) 405 if (c->istate != CHAN_INPUT_CLOSED || c->ostate != CHAN_OUTPUT_CLOSED)
398 return 0; 406 return 0;
399 if (!compat20) { 407 if (!compat20) {