version 1.177, 2002/06/23 21:34:07 |
version 1.178, 2002/06/24 14:33:27 |
|
|
|
|
Channel * |
Channel * |
channel_new(char *ctype, int type, int rfd, int wfd, int efd, |
channel_new(char *ctype, int type, int rfd, int wfd, int efd, |
int window, int maxpack, int extusage, char *remote_name, int nonblock) |
u_int window, u_int maxpack, int extusage, char *remote_name, int nonblock) |
{ |
{ |
int i, found; |
int i, found; |
Channel *c; |
Channel *c; |
|
|
void |
void |
channel_output_poll(void) |
channel_output_poll(void) |
{ |
{ |
int len, i; |
|
Channel *c; |
Channel *c; |
|
int i; |
|
u_int len; |
|
|
for (i = 0; i < channels_alloc; i++) { |
for (i = 0; i < channels_alloc; i++) { |
c = channels[i]; |
c = channels[i]; |
|
|
c->remote_window > 0 && |
c->remote_window > 0 && |
(len = buffer_len(&c->extended)) > 0 && |
(len = buffer_len(&c->extended)) > 0 && |
c->extended_usage == CHAN_EXTENDED_READ) { |
c->extended_usage == CHAN_EXTENDED_READ) { |
debug2("channel %d: rwin %d elen %d euse %d", |
debug2("channel %d: rwin %u elen %u euse %d", |
c->self, c->remote_window, buffer_len(&c->extended), |
c->self, c->remote_window, buffer_len(&c->extended), |
c->extended_usage); |
c->extended_usage); |
if (len > c->remote_window) |
if (len > c->remote_window) |
|
|
c->confirm(c->self, NULL); |
c->confirm(c->self, NULL); |
debug2("callback done"); |
debug2("callback done"); |
} |
} |
debug("channel %d: open confirm rwindow %d rmax %d", c->self, |
debug("channel %d: open confirm rwindow %u rmax %u", c->self, |
c->remote_window, c->remote_maxpacket); |
c->remote_window, c->remote_maxpacket); |
} |
} |
packet_check_eom(); |
packet_check_eom(); |
|
|
channel_input_window_adjust(int type, u_int32_t seq, void *ctxt) |
channel_input_window_adjust(int type, u_int32_t seq, void *ctxt) |
{ |
{ |
Channel *c; |
Channel *c; |
int id, adjust; |
int id; |
|
u_int adjust; |
|
|
if (!compat20) |
if (!compat20) |
return; |
return; |
|
|
} |
} |
adjust = packet_get_int(); |
adjust = packet_get_int(); |
packet_check_eom(); |
packet_check_eom(); |
debug2("channel %d: rcvd adjust %d", id, adjust); |
debug2("channel %d: rcvd adjust %u", id, adjust); |
c->remote_window += adjust; |
c->remote_window += adjust; |
} |
} |
|
|