nodemcu-firmware/app/mqtt
Nathaniel Wesley Filardo 30f706fb03 WIP: MQTT fixes (#2986)
* mqtt: expose "connfail" callback via :on()

This makes it just like all the other callbacks in the module and is a
revision of behavior called out in
https://github.com/nodemcu/nodemcu-firmware/pull/2967

* mqtt: clarify when puback callback fires

* mqtt: Don't reference stack buffers from the heap

The confusingly-named "mqtt_connection_t" object is just a triple of
  - a serialized mqtt message pointer and length
  - a buffer pointer (to which the above can be written)
  - a message identifier

The last of these must be passed around the mqtt state machine, but the
first two are very local and the buffer is always sourced from the C
stack.  Unfortunately, because the entire structure is persisted in the
heap, some callers assume that they can always use the structure without
reinitialization (see mqtt_socket_close), which will trash the C stack.

Sever the pairing between message id and local state, punt the local
state entirely out of the heap, and rename things to be less confusing.
2020-06-09 22:26:52 +02:00
..
Makefile Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
mqtt_msg.c WIP: MQTT fixes (#2986) 2020-06-09 22:26:52 +02:00
mqtt_msg.h WIP: MQTT fixes (#2986) 2020-06-09 22:26:52 +02:00
msg_queue.c Major cleanup - c_whatever is finally history. (#2838) 2019-07-22 00:58:21 +03:00
msg_queue.h polish mqtt module 2015-03-31 23:38:28 +08:00