wolfssh icon indicating copy to clipboard operation
wolfssh copied to clipboard

wolfsftp.c: WS_FATAL_ERROR upon WS_WANT_WRITE

Open dgoldbr opened this issue 1 year ago • 2 comments

Hi!

I am wondering - aren't WS_WANT_READ/WRITE non-fatal errors by design? See here: https://github.com/wolfSSL/wolfssh/blob/ceb461897bcc73390ba4ac3be14f5ca0bb87fda2/src/wolfsftp.c#L411-L419

But what about this: https://github.com/wolfSSL/wolfssh/blob/ceb461897bcc73390ba4ac3be14f5ca0bb87fda2/src/wolfsftp.c#L1573-L1577

Thanks!

dgoldbr avatar Sep 01 '24 13:09 dgoldbr

Hi @dgoldbr

I have requested a review of this topic by our engineers.

embhorn avatar Sep 02 '24 13:09 embhorn

WS_FATAL_ERROR and WS_ERROR are the same value.

ejohnstown avatar Sep 12 '24 18:09 ejohnstown

The story is I wanted to just use WS_ERROR and quit using WS_FATAL_ERROR, since either way you check the stored error code and decide what to do. I never got back to it. I'm thinking it should be WS_ERROR and WS_STATUS, but either way you should still look at the stored error code. This is on the list of things to revisit.

ejohnstown avatar Dec 05 '25 00:12 ejohnstown