BBS: TELESC.NET.BR
Assunto: src/ssh/README.md deucessh-conn.h ssh-conn.c src/ssh/test/test_conn.c
De: Deuc¨
Data: Wed, 6 May 2026 12:19:12 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/74ea58b3f5384f92d62eebd4
Modified Files:
src/ssh/README.md deucessh-conn.h ssh-conn.c src/ssh/test/test_conn.c
Log Message:
DeuceSSH: non-blocking POSIX semantics for dssh_chan_read/write
dssh_chan_read previously returned 0 for both empty-buffer and EOF;
dssh_chan_write returned 0 for both bufsz==0 and remote-window-full.
Both now return DSSH_ERROR_NOMORE for the would-block case (analog
of POSIX -1/EAGAIN), reserving 0 for its POSIX meaning: read=EOF,
write=zero-length write.
Poll-then-{read,write} callers never see NOMORE because dssh_chan_
poll only flags READ/READEXT/WRITE ready when actual progress is
possible. Direct callers without a preceding poll now get an
unambiguous signal instead of a foot-gun.
Includes test_read_nomore_vs_eof covering empty/peek/data/drained/
EOF on the read side and bufsz==0/window-full/normal on the write
side. Two existing tests that hard-coded the old "w==0 means
window-full" contract are updated; one direct-read test
(test_data_after_eof) gains a poll() to wait for EOF instead of
relying on the old "0 means empty or EOF" ambiguity.
Co-Authored-By: Claude Opus 4.7 (1M context)
n
---
mSynchronetn hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net
-----------------------------------------------------------
[Voltar]