Furthermore, the function calls of StringDescr_wrap() will cause syntax error, because these are called outside of a function context.
To fix this, this functions should be moved inside the body of the function ConnectivityMQTTMessaging_Enable() and should process username and password in the same manner as with the clientID to make the generated C code working properly.
MQTT with authentification generates bad C code
When using MQTT with an authentification like this setup
It will generate C code inside src-gen/base/ConnectivityMQTTMessaging.c as follows:
Furthermore, the function calls of
StringDescr_wrap()
will cause syntax error, because these are called outside of a function context.To fix this, this functions should be moved inside the body of the function
ConnectivityMQTTMessaging_Enable()
and should process username and password in the same manner as with the clientID to make the generated C code working properly.Kind Regards