Commit 6cc7f9e
committed
ssh.c: credit the channel window for the bytes a read consumes
- wolfSSH_stream_read() advances inputBuffer->idx before
_UpdateChannelWindow(), records a non-success result in
ssh->error, logs anything other than WS_WANT_WRITE, and reports
the byte count.
- tests/unit.c adds test_stream_read_deferredWindowAdjust(), which
puts a full window of channel data and reads it back with an IO
send that reports WS_CBIO_ERR_WANT_WRITE, checking the byte
count, the payload, ssh->error, the credited window and the
consumed buffer.1 parent 581053b commit 6cc7f9e
2 files changed
Lines changed: 90 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
| 1291 | + | |
1291 | 1292 | | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1295 | 1300 | | |
| 1301 | + | |
1296 | 1302 | | |
1297 | 1303 | | |
1298 | 1304 | | |
| |||
3800 | 3806 | | |
3801 | 3807 | | |
3802 | 3808 | | |
| 3809 | + | |
| 3810 | + | |
3803 | 3811 | | |
3804 | 3812 | | |
3805 | 3813 | | |
| |||
3814 | 3822 | | |
3815 | 3823 | | |
3816 | 3824 | | |
3817 | | - | |
3818 | | - | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
3819 | 3835 | | |
3820 | | - | |
| 3836 | + | |
3821 | 3837 | | |
3822 | 3838 | | |
3823 | 3839 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6063 | 6063 | | |
6064 | 6064 | | |
6065 | 6065 | | |
| 6066 | + | |
| 6067 | + | |
| 6068 | + | |
| 6069 | + | |
| 6070 | + | |
| 6071 | + | |
| 6072 | + | |
| 6073 | + | |
| 6074 | + | |
| 6075 | + | |
| 6076 | + | |
| 6077 | + | |
| 6078 | + | |
| 6079 | + | |
| 6080 | + | |
| 6081 | + | |
| 6082 | + | |
| 6083 | + | |
| 6084 | + | |
| 6085 | + | |
| 6086 | + | |
| 6087 | + | |
| 6088 | + | |
| 6089 | + | |
| 6090 | + | |
| 6091 | + | |
| 6092 | + | |
| 6093 | + | |
| 6094 | + | |
| 6095 | + | |
| 6096 | + | |
| 6097 | + | |
| 6098 | + | |
| 6099 | + | |
| 6100 | + | |
| 6101 | + | |
| 6102 | + | |
| 6103 | + | |
| 6104 | + | |
| 6105 | + | |
| 6106 | + | |
| 6107 | + | |
| 6108 | + | |
| 6109 | + | |
| 6110 | + | |
| 6111 | + | |
| 6112 | + | |
| 6113 | + | |
| 6114 | + | |
| 6115 | + | |
| 6116 | + | |
| 6117 | + | |
| 6118 | + | |
| 6119 | + | |
| 6120 | + | |
| 6121 | + | |
| 6122 | + | |
| 6123 | + | |
| 6124 | + | |
| 6125 | + | |
| 6126 | + | |
| 6127 | + | |
| 6128 | + | |
6066 | 6129 | | |
6067 | 6130 | | |
6068 | 6131 | | |
| |||
16400 | 16463 | | |
16401 | 16464 | | |
16402 | 16465 | | |
| 16466 | + | |
| 16467 | + | |
| 16468 | + | |
| 16469 | + | |
| 16470 | + | |
16403 | 16471 | | |
16404 | 16472 | | |
16405 | 16473 | | |
| |||
0 commit comments