Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return from kws_raw_write on fragmented frame sending #214

Merged
merged 4 commits into from
Jul 16, 2024

Conversation

Astaelan
Copy link
Contributor

@Astaelan Astaelan commented Jul 16, 2024

kws_raw_write should return the total number of bytes sent, not just the last fragment sent

Discussion with @andywolk concluded that we're still not comfortable with the condition and return here:
https://github.com/signalwire/libks/blob/master/src/kws.c#L1626

However, with the fix this will no longer be hit due to fragmented sending. I am leaving it to Andrey to follow up on what they want to do about that code acting as if it can handle partial returns when it cannot happen.

@Astaelan Astaelan requested a review from andywolk July 16, 2024 18:40
…, but according to SSL lib 0 is an error so the behavior is slightly different using SSL versus not on the writing returns
…ns the error instead of the total written bytes
@andywolk andywolk added the bug Something isn't working label Jul 16, 2024
@andywolk andywolk merged commit 1769030 into master Jul 16, 2024
16 of 17 checks passed
@andywolk andywolk deleted the fix-kws-raw-write branch July 16, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants