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

Bug with multithreading #3193

Open
OgreTransporter opened this issue Dec 30, 2024 · 0 comments
Open

Bug with multithreading #3193

OgreTransporter opened this issue Dec 30, 2024 · 0 comments
Labels
Status: Available No one has claimed responsibility for resolving this issue.

Comments

@OgreTransporter
Copy link

If you try to compile mosquitto without multithreading (-DWITH_THREADING=OFF) you will get a number of error messages, because mosquitto_internal.h line 271 checks whether threading is enabled or not, but not in the rest of the library.

#if defined(WITH_THREADING) && !defined(WITH_BROKER)

For example, an attempt is made in handle_connack.c line 120 to use the variable state_mutex, but this is not defined if no threads are activated.

pthread_mutex_lock(&mosq->state_mutex);

pthread is now used without verification in so many files that the library must be assumed to be required.

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue.
Projects
None yet
Development

No branches or pull requests

1 participant