mosquitto-users team mailing list archive
-
mosquitto-users team
-
Mailing list archive
-
Message #00469
v1.30 breaks embedded usage
Roger,
I think v1.30 has some issues, please advise.
With v1.2.3 I was able to get a Mosquitto C client running on a STM32
microcontroller with lwIP and FreeRTOS with relative ease, just a little
massaging of the code here and there.
With v1.30 it seems to have gotten broken, namely because of #ifdef
WITH_THREADING requirements to add the in_message_mutex and
out_message_mutex members to the mosquito struct. Since threading does not
apply to my usage case, if I do not define WITH_THREADING then these members
are not included in the struct and the code fails to compile for places
where these members are accessed but not protected by that ifdef. For
example, all of these functions require in_message_mutex and/or
out_message_mutex member to exist, but if WITH_THREADING is not defined then
the code will fail to compile because those members do not exist.
_mosquitto_messages_reconnect_reset()
_mosquitto_message_remove()
_mosquitto_message_retry_check()
mosquitto_loop_read()
mosquitto_loop_write()
_mosquitto_handle_publish()
Am I wrong? Should I be defining WITH_THREADING for a FreeRTOS build? I am
not sure that I should, there is no pthread.h header file for me to include
if I do so, so I end up including the dummypthread.h header instead.
Also, I had to add a definition for pthread_mutex_t to your dummypthread.h
file since it is not defined anywhere else that I could find. Without it,
the code will not compile.
I realize that my usage case is not the norm, so perhaps you just assumed
that the target would support threading? If I am wrong and need to change
something, please advise.
Thanks.
Regards,
David Reid
Silicon Engines
david.reid@xxxxxxxxxxxxxxxxxx
847.637.1180 x234
847.637.1185 (f)
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
Follow ups