mirror of https://github.com/wolfSSL/wolfssh.git
- wolfSSH_worker() calls wolfSSH_SendPacket() whenever ssh->outputBuffer holds bytes and the session is not disconnected. 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; WS_REKEYING is withheld on a failed flush. Drops the second DoReceive(), the WOLFSSH_TEST_BLOCK fork and the separate WS_CHANNEL_CLOSED flush. - BundlePacket() resets ssh->outputBuffer.length to ssh->packetStartIdx when the framing fails. wolfSSH_shutdown() reports WS_WANT_WRITE when its close-read leaves output queued, and the send's own error in place of it when that send failed. SendPacketFlush() records its code in ssh->error on every transport failure path, and wolfSSH_TriggerKeyExchange() writes it only when SendKexInit() fails. - portfwd, client and scpclient accept WS_WANT_WRITE from wolfSSH_shutdown(); in scpclient the close-message drain runs on it. - wolfssh/ssh.h drops WS_WINDOW_FULL from wolfSSH_worker() and says to read the return and wolfSSH_get_error() as independent channels on every pass. - Twenty unit tests and the extended TestWorkerReportsDisconnect cover what ret and ssh->error hold after a receive, send, buffer, callback or framing failure. |
||
|---|---|---|
| .. | ||
| client.c | ||
| client.h | ||
| common.c | ||
| common.h | ||
| include.am | ||