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
ssh: flush the worker's queued output and report status directly
- wolfSSH_worker() calls wolfSSH_SendPacket() whenever
ssh->outputBuffer holds bytes, in place of doing so only for
WS_SUCCESS, WS_WANT_READ or WS_CHAN_RXD. It replaces DoReceive()'s
WS_FATAL_ERROR with ssh->error when that holds a specific code,
writes *channelId before the send, and takes the send status only
for a failure other than WS_WANT_WRITE. Drops the second
DoReceive(), its WS_WINDOW_FULL case, and the WOLFSSH_TEST_BLOCK
fork.
- GetInputData() returns its condition in place of assigning
ssh->error and returning WS_FATAL_ERROR; DoReceive() records it
at both call sites.
- SendChannelData() and SendChannelExtendedData() capture the send
status into sendRet and record it inside the existing
ret == WS_SUCCESS block, which now also gates plainSz. Both set
plainSz as well when the flush of already-queued output returns
WS_WANT_WRITE.
- _ChannelRead(), _ChannelReadExt() and
SendPendingChannelWindowAdjust() drop their savedError capture
and restore, keeping the assignment on failure.
- wolfSSH_shutdown() reads ret in its teardown-send guards.
- FlushQueuedSend() loops while wolfSSH_get_error() reports
WS_WANT_WRITE within its deadline, leaves the loop on a status
outside the receive's own, and returns WS_WANT_WRITE when the
queue is still out.
- echoserver, wolfsshd, sftpclient, client and scpclient gate on the
worker's and shutdown's return values, and sftpclient and the
wolfssh app drop 12 now-dead WS_FATAL_ERROR translations.
- server_worker() and HandleConnection() treat WS_CHANNEL_CLOSED
from wolfSSH_shutdown() as a clean end alongside WS_SOCKET_ERROR_E;
wolfsshd's drain loops on WS_SUCCESS, the wants, WS_CHAN_RXD,
WS_EXTDATA and WS_REKEYING; echoserver's SFTP trigger and its
end-of-connection report read wolfSSH_get_error().
- tests cover the worker's flush and the codes it now returns, and
assert ssh->error carries the owed flush while one is queued.
0 commit comments