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(modem): callback rerun after final result (IDFGH-11611) #450

Closed
wants to merge 1 commit into from

Conversation

dset0x
Copy link

@dset0x dset0x commented Dec 5, 2023

When running DTE::command, data following an "OK" or "ERROR" response could cause the user callback to be re-run before got_line is cleared. If the callback then returned ESP_ERR_TIMEOUT (e.g. in the case of a URC), command_cb::result would now be command_result::TIMEOUT, while command_cb::signal still has command_cb::got_line set from the previous invocation. This then manifested as ESP_ERR_INVALID_STATE.

When running DTE::command, data following an "OK" or "ERROR" response
could cause the user callback to be re-run before `got_line` is cleared.
If the callback then returned ESP_ERR_TIMEOUT (e.g. in the case of a
URC), command_cb::result would now be command_result::TIMEOUT, while
command_cb::signal still has command_cb::got_line set from the previous
invocation. This then manifested as ESP_ERR_INVALID_STATE.
@dset0x
Copy link
Author

dset0x commented Dec 5, 2023

I now see an alternate fix is already open here: #446

I have to say I prefer having the fix in one location, even though it can be debated what is the right place to have the check.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Dimitrios Semitsoglou-Tsiapos seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot changed the title fix(modem): callback rerun after final result fix(modem): callback rerun after final result (IDFGH-11611) Dec 5, 2023
@david-cermak
Copy link
Collaborator

Thanks for the fix!

I now see an alternate fix is already open here: #446

Yes, there's already another fix, currently under review.

I have to say I prefer having the fix in one location, even though it can be debated what is the right place to have the check.

Please feel free to chime in with your view on the #446 -- still waiting for reviews, all comments are welcome!

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.

4 participants