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

Possible null frames added to frame pool #15

Closed
willtoth opened this issue Apr 30, 2019 · 5 comments
Closed

Possible null frames added to frame pool #15

willtoth opened this issue Apr 30, 2019 · 5 comments

Comments

@willtoth
Copy link

In the case that the frame pool is empty but an rx request in pending, the logic will re-insert a null frame into the frame pool.

Specifically in main, when can_is_rx_pending returns true, but queue_pop_front is called on an empty queue and returns a null frame:

https://github.com/HubertD/candleLight_fw/blob/53b4b915af166575d7c93d63811001ae89e45e33/src/main.c#L118-L137

@HubertD
Copy link
Collaborator

HubertD commented Oct 29, 2019

you are absolutely right, this makes no sense.

@jhofstee
Copy link
Contributor

I have a patch for this...

HubertD pushed a commit that referenced this issue Oct 29, 2019
thanks to @willtoth
@HubertD
Copy link
Collaborator

HubertD commented Oct 29, 2019

i'd expect i roughly looks like this?
ba1e4cc?diff=unified#diff-803c5170888b8642f2a97e5e9423d399L132-L134

@jhofstee
Copy link
Contributor

jhofstee commented Oct 29, 2019 via email

@HubertD
Copy link
Collaborator

HubertD commented Oct 29, 2019

should not mess around in old code after 8 hours debugging at work, i guess.
Fixed it the way you did, @jhofstee
also fixed the tabs/whitespace issues in main.c

@HubertD HubertD closed this as completed Oct 29, 2019
HubertD pushed a commit that referenced this issue Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants