We just don't have the memory to be a real TLS client on the 8266. Put
that in a big box and point at it from the http and mqtt modules; others
may also wish to give reference.
* list_ref can become LUA_REFNIL, because that's what rawgeti returns
for LUA_NOREF. Defensively guard for this, rather than falling into
the sntp_dolookups loop with nil on the stack.
* set_repeat_mode should not call itself, but should rather always do
what it's going to do and then optionally do the rest if directed.
* sntp_sync should not try to special case the single string argument:
we should be queueing that name for DNS resolution, too. Towards that
end, if we are given a single string, build a table and make that the
list_ref and call off to sntp_dolookups, just like we otherwise do.
FIXES: #2699
The PR removed the bulk of non-newlib headers from the NodeMCU source base.
app/libc has now been cut down to the bare minimum overrides to shadow the
corresponding functions in the SDK's libc. The old c_xyz.h headerfiles have been
nuked in favour of the standard <xyz.h> headers, with a few exceptions over in
sdk-overrides. Again, shipping a libc.a without headers is a terrible thing to do. We're
still living on a prayer that libc was configured the same was as a default-configured
xtensa gcc toolchain assumes it is. That part I cannot do anything about, unfortunately,
but it's no worse than it has been before.
This enables our source files to compile successfully using the standard header files,
and use the typical malloc()/calloc()/realloc()/free(), the strwhatever()s and
memwhatever()s. These end up, through macro and linker magic, mapped to the
appropriate SDK or ROM functions.
* mqtt:connect() secure parameter should be boolean
Continue to honor the old 0/1 values, but make them undocumented and add
a deprecation warning to the code and docs. Eventually, this should go
away.
* mqtt: rip out deprecated autoreconnect
* mqtt: expose all the callbacks via :on