nodemcu-firmware/app/modules
Nathaniel Wesley Filardo c695a451ee
First round of MQTT fixes (#3360)
* mqtt: remove concept of connection timeout

Just rely on the network stack to tell us when things have gone south.

* mqtt: remove write-only mqtt_state.port field

* mqtt: drop useless conditional

* mqtt: decouple message sent flag from timer

* mqtt: reconnect callback does not need to hang up

The network stack has certainly done that for us at this point.
Similarly, since we're about to call mqtt_socket_disconnected, don't
bother unregistering the timer here, either.

* mqtt: don't tick once per second

Set the timer for the duration of the wait and cancel it on the other side.

* mqtt: defer message queue destruction to _disconnect

We're going to want to publish a disconnect message for real, so doing
this in _close does no one any favors

* mqtt: miscellaneous cleanups

No functional change intended

* mqtt: close() should send disconnect message for real

This means waiting for _sent() to fire again before telling the network
stack to disconnect.

* mqtt: tidy connect and dns

- Push the self-ref to after all allocations and error returns

- Don't try to extract IPv4 from the domain string ourselves, let the
  resolver, since it can

- Don't try to connect to localhost.  That can't possibly work.

* mqtt: common up some callback invocations

* mqtt: don't retransmit messages on timeout

There's no point in retransmitting messages on timeout; the network
stack will be trying to do it for us anyway.

* mqtt: remove unnecessary NULL udata checks

* mqtt: hold strings in Lua, not C

Eliminates a host of C-side allocations.

While here, move the rest of the mqtt_connect_info structure out to its
own thing, and pack some flags using a bitfield.

* mqtt: mqtt_socket_on use lua_checkoption

* mqtt: slightly augment debug messages

These changes have made some debugging ever so slightly easier.
2021-01-05 12:07:09 +01:00
..
enduser_setup Improve the enduser setup experience by triggering captive portal detection. (#3282) 2020-09-18 23:47:52 +02:00
.gitignore Adds support for verifying the certificate offered by an SSL server. 2016-03-09 21:51:23 -05:00
Makefile Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
adc.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
ads1115.c ads1115 minor cleanup 2020-06-17 23:50:31 +01:00
adxl345.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
am2320.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
apa102.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
bit.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
bloom.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
bme280.c bme280 driver in Lua+C 2020-10-05 20:41:36 +01:00
bme280_math.c bme280 driver in Lua+C 2020-10-05 20:41:36 +01:00
bme680.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
bme680_defs.h Update sensor driver for BME680 to 3.5.9 (#2969) 2020-06-09 22:26:06 +02:00
bmp085.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
coap.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
color_utils.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
color_utils.h Major cleanup - c_whatever is finally history. (#2838) 2019-07-22 00:58:21 +03:00
cron.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
crypto.c crypto: remove toHex and toBase64 (#3300) 2020-09-28 20:42:16 +02:00
dcc.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
dht.c Fix DHT module (#3334) 2020-12-16 23:20:09 +01:00
encoder.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
enduser_setup.c Improve the enduser setup experience by triggering captive portal detection. (#3282) 2020-09-18 23:47:52 +02:00
file.c Improved startup performance and measurement tools. (#3171) 2020-10-18 20:46:47 +02:00
gdbstub.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
gpio.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
gpio_pulse.c Guard against freeing a ref of zero (#3308) 2020-10-13 21:43:38 +02:00
hdc1080.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
hmc5883l.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
http.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
hx711.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
i2c.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
l3g4200d.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
mcp4725.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
mdns.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
mqtt.c First round of MQTT fixes (#3360) 2021-01-05 12:07:09 +01:00
net.c Remove some uses of etc_*printf 2020-09-27 03:05:36 +01:00
net_ping.c net_info module - ping function (#2854) 2020-06-09 22:26:52 +02:00
net_ping.h net_info module - ping function (#2854) 2020-06-09 22:26:52 +02:00
node.c Improved startup performance and measurement tools. (#3171) 2020-10-18 20:46:47 +02:00
ow.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
pcm.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
perf.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
pipe.c Add pipeutils example (#3354) 2020-12-29 08:54:54 +01:00
pwm.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
pwm2.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
rfswitch.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
rotary.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
rtcfifo.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
rtcmem.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
rtctime.c Add support to set the clock rate and have sntp use it. (#3236) 2020-08-08 13:32:14 +02:00
si7021.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
sigma_delta.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
sjson.c Make it work for the integer lua51 build 2020-09-27 03:05:36 +01:00
sntp.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
softuart.c Fix softuart module setup function parameters (#3348) 2020-12-16 12:56:55 +01:00
somfy.c Add Somfy receiver (#3320) 2020-12-28 00:04:32 +01:00
spi.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
struct.c Change struct & sjson to use integers. This is slightly more complex (#3222) 2020-08-23 23:11:18 +01:00
switec.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
tcs34725.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tls.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tm1829.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
tmr.c Allow turning off softwd again as documented (#3327) 2020-11-13 11:11:29 +00:00
tsl2561.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
u8g2.c u8g2: Fix name of updateDisplay export (#3093) 2020-06-09 22:26:52 +02:00
uart.c uart: expose fifo depth counters (#3177) 2020-09-18 23:46:32 +02:00
ucg.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
websocket.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
wiegand.c wiegand Lua 5.3 fix 2020-10-23 04:19:41 +01:00
wifi.c Fix the initialization of the wifi default hostname. (#3303) 2020-10-18 20:48:10 +02:00
wifi_common.c Major cleanup - c_whatever is finally history. (#2838) 2019-07-22 00:58:21 +03:00
wifi_common.h Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
wifi_eventmon.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
wifi_monitor.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
wps.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
ws2801.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
ws2812.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
ws2812.h Fixes for `ws2812` and `ws2812_effects` (#2953) 2020-06-09 22:26:06 +02:00
ws2812_effects.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
xpt2046.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00