|
Lines 754-761
channel_pre_open(Channel *c, fd_set * re
Link Here
|
| 754 |
|
754 |
|
| 755 |
if (c->istate == CHAN_INPUT_OPEN && |
755 |
if (c->istate == CHAN_INPUT_OPEN && |
| 756 |
limit > 0 && |
756 |
limit > 0 && |
| 757 |
buffer_len(&c->input) < limit) |
757 |
buffer_len(&c->input) < limit) { |
|
|
758 |
debug("XXX: channel %d: rfd set len %u lim %u", c->self, |
| 759 |
buffer_len(&c->input), limit); |
| 758 |
FD_SET(c->rfd, readset); |
760 |
FD_SET(c->rfd, readset); |
|
|
761 |
} |
| 759 |
if (c->ostate == CHAN_OUTPUT_OPEN || |
762 |
if (c->ostate == CHAN_OUTPUT_OPEN || |
| 760 |
c->ostate == CHAN_OUTPUT_WAIT_DRAIN) { |
763 |
c->ostate == CHAN_OUTPUT_WAIT_DRAIN) { |
| 761 |
if (buffer_len(&c->output) > 0) { |
764 |
if (buffer_len(&c->output) > 0) { |
|
Lines 1446-1451
channel_handle_rfd(Channel *c, fd_set *
Link Here
|
| 1446 |
} else if (c->datagram) { |
1449 |
} else if (c->datagram) { |
| 1447 |
buffer_put_string(&c->input, buf, len); |
1450 |
buffer_put_string(&c->input, buf, len); |
| 1448 |
} else { |
1451 |
} else { |
|
|
1452 |
debug2("XXX channel %d: read %d rfd %d buf len %u", |
| 1453 |
c->self, len, c->rfd, buffer_len(&c->input)); |
| 1449 |
buffer_append(&c->input, buf, len); |
1454 |
buffer_append(&c->input, buf, len); |
| 1450 |
} |
1455 |
} |
| 1451 |
} |
1456 |
} |