mirror of https://github.com/wolfSSL/wolfssh.git
- wolfSSH_stream_read() advances inputBuffer->idx before crediting the window, and it and _ChannelRead() return the bytes copied with a non-success adjust left in ssh->error. - _ChannelRead() takes the WOLFSSH from channel->ssh, rejects an idx past inputBuffer->length, restores the entry ssh->error on a clean credit, and retires a stale WS_WANT_WRITE only when its own credit went out. - wolfSSH_SFTP_Close() checks NoticeError() only on a failed send. - The src/ssh.c block comments, and new wolfssh/ssh.h notes above wolfSSH_stream_read(), wolfSSH_ChannelRead() and wolfSSH_ChannelIdRead(), state the window-adjust and ssh->error contract. - tests/unit.c adds test_stream_read_deferredWindowAdjust() and test_ChannelIdRead_deferredWindowAdjust(): an adjust that defers, then fails, then succeeds, plus a read with nothing buffered against a seeded WS_WANT_WRITE. |
||
|---|---|---|
| .. | ||
| api.c | ||
| api.h | ||
| auth.c | ||
| auth.h | ||
| include.am | ||
| kex.c | ||
| kex.h | ||
| regress.c | ||
| sftp.c | ||
| sftp.h | ||
| testsuite.c | ||
| testsuite.h | ||
| unit.c | ||
| unit.h | ||