We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
void mqtt_example_init(void) { #if LWIP_TCP mqtt_client = mqtt_client_new(); mqtt_set_inpub_callback(mqtt_client, mqtt_incoming_publish_cb, mqtt_incoming_data_cb, LWIP_CONST_CAST(void*, &mqtt_client_info)); mqtt_client_connect(mqtt_client, &mqtt_ip, MQTT_PORT, mqtt_connection_cb, LWIP_CONST_CAST(void*, &mqtt_client_info), &mqtt_client_info); #endif /* LWIP_TCP */ }
mqtt_set_inpub_callback: This function should be called after mqtt_client_connect() is done!
Due to it will be wipe clean inside mqtt_client_connect() function https://github.com/particle-iot/lwip/blob/master/src/apps/mqtt/mqtt.c#L1311 then whenever mqtt messages come => it got crashed at line: https://github.com/particle-iot/lwip/blob/master/src/apps/mqtt/mqtt.c#L773 NULL_PTR Callback
So it should be like this:
void mqtt_example_init(void) { #if LWIP_TCP mqtt_client = mqtt_client_new(); mqtt_client_connect(mqtt_client, &mqtt_ip, MQTT_PORT, mqtt_connection_cb, LWIP_CONST_CAST(void*, &mqtt_client_info), &mqtt_client_info); mqtt_set_inpub_callback(mqtt_client, mqtt_incoming_publish_cb, mqtt_incoming_data_cb, LWIP_CONST_CAST(void*, &mqtt_client_info)); #endif /* LWIP_TCP */ }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
mqtt_set_inpub_callback: This function should be called after mqtt_client_connect() is done!
Due to it will be wipe clean inside mqtt_client_connect() function
https://github.com/particle-iot/lwip/blob/master/src/apps/mqtt/mqtt.c#L1311
then whenever mqtt messages come => it got crashed at line: https://github.com/particle-iot/lwip/blob/master/src/apps/mqtt/mqtt.c#L773 NULL_PTR Callback
So it should be like this:
The text was updated successfully, but these errors were encountered: