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

sys/net/application_layer/asymcute/ #21211

Open
DeJusten opened this issue Feb 13, 2025 · 1 comment
Open

sys/net/application_layer/asymcute/ #21211

DeJusten opened this issue Feb 13, 2025 · 1 comment

Comments

@DeJusten
Copy link

Description

In MQTT-SN Stack asynCute, some mutex_unlock() calls are missing, which I could easily change.
These mutex_unlock() calls are mostly missing where an error is queried that should not occur in normal operation. In addition to the mutex_unlock() command, the central callback function con->cb() should also be called by inserting a new error state so that the system can be restarted, for example. The latter would cause compatibility problems with existing implementations. Alternatively, this could also be solved with assert(), but this would not be my preferred solution.
How should I deal with the call to the callback function, which I believe is missing? I would be happy to initially incorporate these calls as a comment in the code.

Steps to reproduce the issue

Only proven in a theoretical context

Expected results

In the event of an error, no further use of asymcute_req_t objects is possible.
Error query caused, for example, by incorrect dereferencing, so that the system state is to be regarded as critical.

Actual results

Versions

@mguetschow
Copy link
Contributor

Thanks for your issue report!

Could you be more specific where exactly the calls to mutex_unlock are missing? The most straightforward way would be for you to change the file accordingly and propose a PR for us to review the changes.

The missing call to the callback function sounds to me like a separate problem that could be fixed in a second PR. Without having a closer look at the implementation, it sounds reasonable to me to somehow stop the module when an error occurs, and passing it through the callback function sounds reasonable too.

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

2 participants