You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- wolfSSH_worker() calls wolfSSH_SendPacket() whenever
ssh->outputBuffer holds bytes and the session is not
disconnected, in place of doing so only for WS_SUCCESS,
WS_WANT_READ, WS_CHAN_RXD or WS_EOF. ssh->error keeps the
receive's code when the receive failed, and the close's when a
WS_CHANNEL_CLOSED pass hard-failed its flush; a function-scope
sendRet also masks the WS_REKEYING report. Drops the second
DoReceive(), its WS_WINDOW_FULL case, the WOLFSSH_TEST_BLOCK
fork, and the separate WS_CHANNEL_CLOSED flush.
- BundlePacket() resets ssh->outputBuffer.length to
ssh->packetStartIdx when the framing fails, and
wolfSSH_shutdown() reports WS_WANT_WRITE when its read for the
peer's close leaves output queued.
- SendPacketFlush() records its code in ssh->error on every
transport failure path; wolfSSH_SendPacket() says so and what a
later write to that field owes it.
- wolfssh/ssh.h drops WS_WINDOW_FULL from wolfSSH_worker() and
names the two exceptions to a status surviving a failed flush:
a hard-failed WS_CHANNEL_CLOSED, and WS_REKEYING. Comments in
ssh.c, unit.c, the echoserver, the Espressif copy and portfwd
name the channel's own state or the failing call instead of
restating a contract.
- Sixteen unit tests and the extended TestWorkerReportsDisconnect
cover what ret and ssh->error hold after a receive, send,
buffer, callback or framing failure, against channel data,
extended data, a half-close, a rekey, a close, and a teardown
read. The #ifndef WOLFSSH_TEST_BLOCK guards around
TestWorkerReadsWhenSendWouldBlock go with the send-first fork.
0 commit comments