/ > mq:subscribe("test",0,mqmsg)
Guru Meditation Error of type LoadProhibited occurred on core 0. Exception was unhandled.
Register dump:
....
The source of the error is to small alocated memory for topic string in add_subs_callback function.
It is necessary to change:
callback->topic = (char *)malloc(strlen(topic));
to
callback->topic = (char *)malloc(strlen(topic)+1);
With that change subscribe function works as expected.
Mqtt subscribe causes the panic:
The source of the error is to small alocated memory for topic string in add_subs_callback function. It is necessary to change:
callback->topic = (char *)malloc(strlen(topic));
tocallback->topic = (char *)malloc(strlen(topic)+1);
With that change subscribe function works as expected.