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

LoRaMacFCntHandler: changed initialization order #666

Merged
merged 1 commit into from
Feb 8, 2019

Conversation

mvds00
Copy link
Contributor

@mvds00 mvds00 commented Jan 27, 2019

The callback is assigned after resetting FCnt values in LoRaMacResetFCnts(), while LoRaMacResetFCnts() tries to invoke the callback using NvmCtxChanged(), which will either fail (no callback has been set before) or - in theory - call a callback which has been assigned before, which seems to lead to unexpected behavior.

By reversing the statements this is fixed.

The callback is assigned after resetting FCnt values in LoRaMacResetFCnts(),
while LoRaMacResetFCnts() tries to invoke the callback using NvmCtxChanged(),
which will either fail (no callback has been set before) or - in theory - call
a callback which has been assigned before, which seems to lead to unexpected
behavior.

By reversing the statements all is fixed.
@mluis1 mluis1 merged commit de1640c into Lora-net:develop Feb 8, 2019
@mluis1 mluis1 added this to the Release Version 4.4.2 milestone Apr 18, 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

Successfully merging this pull request may close these issues.

2 participants