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

esp_spp_write() fails in a quite spectacular way when len is 0 (IDFGH-8523) #9977

Closed
Delzye opened this issue Oct 14, 2022 · 0 comments
Closed
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Feature Request Feature request for IDF

Comments

@Delzye
Copy link

Delzye commented Oct 14, 2022

Is your feature request related to a problem?

I had a mistake in my code which prompted the len for my buffer to be overwritten with 0 sometimes.
I realise that sending nothing (len = 0) should not be done and I could have written a check for that myself, but making esp_spp_write in a different way would be appreciated.

Currently. the message gets enqueued in osi_thread_post(), but when retrieving it, at some point in another call of fixed_queue_enqueue(), the assertion "data != NULL" gets triggered (I assume the len was used to copy the data somewhere, which failed if len=0, I did not research that in any more detail).

Describe the solution you'd like.

just returning from esp_spp_write() if len=0 would be nice.

Describe alternatives you've considered.

Writing the check myself, but since that would be needed with every esp_spp_write anyway, integrating it directly would be nicer (and you don't spend hours debugging a pretty obscure error message...).

Additional context.

No response

@Delzye Delzye added the Type: Feature Request Feature request for IDF label Oct 14, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Oct 14, 2022
@github-actions github-actions bot changed the title esp_spp_write() fails in a quite spectacular way when len is 0 esp_spp_write() fails in a quite spectacular way when len is 0 (IDFGH-8523) Oct 14, 2022
@espressif-bot espressif-bot added Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable labels Oct 18, 2022
espressif-bot pushed a commit that referenced this issue Oct 24, 2022
espressif-bot pushed a commit that referenced this issue Oct 24, 2022
espressif-bot pushed a commit that referenced this issue Nov 1, 2022
espressif-bot pushed a commit that referenced this issue Nov 11, 2022
espressif-bot pushed a commit that referenced this issue Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

3 participants