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. A failed flush reaches the
return only when the receive reported nothing. 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. Drops the second
DoReceive(), its WS_WINDOW_FULL case, the WOLFSSH_TEST_BLOCK
fork, and the separate WS_CHANNEL_CLOSED flush.
- sendRet moves to the top of wolfSSH_worker(), and the
WS_REKEYING report is skipped when the flush failed.
- SendPacketFlush() records its code in ssh->error on every
transport failure path, and wolfSSH_SendPacket() says so and
what a later write to that field owes it.
- wolfssh/ssh.h states the rule on wolfSSH_worker(): a status
survives in the return while wolfSSH_get_error() holds the
flush's code, except that a WS_CHANNEL_CLOSED whose flush failed
hard keeps the close. It drops WS_WINDOW_FULL, which the worker
can no longer return. The echoserver, Espressif and portfwd
comments now name the channel's own state rather than restating
the worker's contract, and four comments in ssh.c and unit.c
drop the former one.
- The #ifndef WOLFSSH_TEST_BLOCK guards around
TestWorkerReadsWhenSendWouldBlock go. The send-first fork they
worked around is gone, so it runs in every configuration.
- tests cover the flush on an idle receive, the owed flush across
calls, what ssh->error holds after a receive failure, a hard
send failure, channel data alongside a failed send with and
without a rekey, a rekey the flush did not disturb, a discarded
buffer, an out-of-bounds send, a missing send callback, a bad
buffer state and a close whose flush hard-failed, and queued
output staying unsent on the disconnect pass.
0 commit comments