version 1.49, 2003/08/29 10:04:36 |
version 1.49.4.1, 2004/08/19 04:13:26 |
|
|
* tear down of channels: |
* tear down of channels: |
* |
* |
* 1.3: strict request-ack-protocol: |
* 1.3: strict request-ack-protocol: |
* CLOSE -> |
* CLOSE -> |
* <- CLOSE_CONFIRM |
* <- CLOSE_CONFIRM |
* |
* |
* 1.5: uses variations of: |
* 1.5: uses variations of: |
* IEOF -> |
* IEOF -> |
* <- OCLOSE |
* <- OCLOSE |
* <- IEOF |
* <- IEOF |
* OCLOSE -> |
* OCLOSE -> |
* i.e. both sides have to close the channel |
* i.e. both sides have to close the channel |
* |
* |
* 2.0: the EOF messages are optional |
* 2.0: the EOF messages are optional |
* |
* |
|
|
} |
} |
|
|
int |
int |
chan_is_dead(Channel *c, int send) |
chan_is_dead(Channel *c, int do_send) |
{ |
{ |
if (c->type == SSH_CHANNEL_ZOMBIE) { |
if (c->type == SSH_CHANNEL_ZOMBIE) { |
debug2("channel %d: zombie", c->self); |
debug2("channel %d: zombie", c->self); |
|
|
return 0; |
return 0; |
} |
} |
if (!(c->flags & CHAN_CLOSE_SENT)) { |
if (!(c->flags & CHAN_CLOSE_SENT)) { |
if (send) { |
if (do_send) { |
chan_send_close2(c); |
chan_send_close2(c); |
} else { |
} else { |
/* channel would be dead if we sent a close */ |
/* channel would be dead if we sent a close */ |