Commit Graph

1297 Commits

Author SHA1 Message Date
Deomid Ryabkov
d3a8862bd8 Make interface vtables const
Frees up a bit of ram on ESP

PUBLISHED_FROM=0ea046cc63704481bca138b3096937669b94733d
2017-03-11 00:11:56 +00:00
Deomid Ryabkov
08353731ef Fix MQTT PUB{ACK,REC,REL,COMP} and UNSUBACK flags
Flags should be 0 for all of these, except PUBREL (flags = 2).

PUBLISHED_FROM=46bf63fe12020d4cb493e52ceb3bae0291484b40
2017-03-08 00:23:14 +00:00
Deomid Ryabkov
16700244b0 Fix parsing of MQTT QoS > 0 PUBLISH messages
Message ID comes after topic, not before.

PUBLISHED_FROM=1ec2a56e290b67061b18c745671dc7f089b9cc0d
2017-03-07 23:52:42 +00:00
Deomid Ryabkov
49ca223e9c Minor memory optimization
Release pbuf sooner: after copying data from, before invoking user code

PUBLISHED_FROM=b877c96ef602bbca26762b18b9dde17eb880d1f9
2017-03-07 17:19:47 +00:00
Sergey Lyubka
38efe632ae Squash warning
PUBLISHED_FROM=72d80f8ed2c10866b44d56d8133c76b22bc105b0
2017-03-06 21:51:43 +00:00
Deomid Ryabkov
39a3bb7e44 Log method and URI in mg_http_handler
PUBLISHED_FROM=34c3e49d523b0f5c7056f91e4b422f21f5694df9
2017-03-02 09:36:08 +00:00
Alexander Alashkin
920e8d9145 Add shims for mongoose file operations
PUBLISHED_FROM=b5b12cdf4273f21dbcdac9bfb6a06063152914c9
2017-03-01 10:06:47 +00:00
Alexander Alashkin
aed6d05d8c Do not test reassembled buffer for WS_OP_CLOSE
PUBLISHED_FROM=0e8de208b553b63c8367f66893389587bd17359f
2017-03-01 10:06:46 +00:00
Alexander Alashkin
d85d95a40b Fix potential out-of-bound
PUBLISHED_FROM=71b40189bcedbe9338915c1aad939835125dad26
2017-03-01 10:06:45 +00:00
Alexander Alashkin
b5dd54a404 Fix doc typos
PUBLISHED_FROM=1bdacf793b35ebe70d0a3a9d64260dd2bd135c73
2017-03-01 06:19:58 +00:00
Dmitry Frank
349d25dccf Fix # matching logic
E.g. given the expression `foo/#`:

- `foo/bar` matches
- `foo/` should not match
- `foo` should not match

PUBLISHED_FROM=40f3290cb9a478b22d9f1ab6382884b5de70e266
2017-02-24 15:35:20 +00:00
Dmitry Frank
3942914945 Fix subscription to wildcard topics
`mg_mqtt_match_topic_expression()` and friends are public now.

So far, only `#` is supported.

PUBLISHED_FROM=20c031bcf34be84771c4a9c456318634eb9a517c
2017-02-24 14:21:33 +00:00
Dmitry Frank
60c16bbb5d Fix mos docker image name
PUBLISHED_FROM=91016ab1629a65976d2cc2f00aec4e1667cb4a8f
2017-02-23 21:35:24 +00:00
Sergey Lyubka
70b5f4130e Add http post example
PUBLISHED_FROM=94f830a5fa4b806fb2cf60c93a9e8744022ff8d7
2017-02-23 17:50:14 +00:00
Deomid Ryabkov
81879be4be RTOS stability improvements
PUBLISHED_FROM=2992473e6c05c1dc95878cc549eccba7abcedccf
2017-02-16 16:05:22 +00:00
Deomid Ryabkov
0a094d4c1f Decouple mg_lwip_accept_cb from mg_if_accept_tcp_cb
Must be invoked on mongoose main task, not on LWIP

Also request immediate poll oif there is data to be sent and space to
send it.

PUBLISHED_FROM=53576651452d8d7193da9e63f5b97f6f8729c45b
2017-02-16 12:19:23 +00:00
Deomid Ryabkov
66a96410d4 ESP8266: Add RTOS SDK port (MGOS_ESP8266_RTOS=1)
PUBLISHED_FROM=ca5332e63700274ed9aeea9d9d1802e89fa788fa
2017-02-16 11:05:34 +00:00
Deomid Ryabkov
d4b23f08b6 Implement client support for TLS-PSK
For both OpenSSL and mbedTLS

PUBLISHED_FROM=0bfd5f128b4c4c062cb6f0ca0da9b30790aa8bf8
2017-02-15 08:20:53 +00:00
Sergey Lyubka
ab1c464950 Fix https://github.com/cesanta/mongoose/issues/765
PUBLISHED_FROM=f7f8ce9421d96a5f0d90afe4c930c53662b4e907
2017-02-11 04:50:44 +00:00
Deomid Ryabkov
f20b5191f2 Check UDP pbuf for being NULL
cesanta/mongoose-os#186

PUBLISHED_FROM=30460b56211eb0dff4d05bff45f256ac1da2caf4
2017-02-10 02:35:08 +00:00
Deomid Ryabkov
fc113d64f5 Add mg_hexdumpf: mg_hexdump that outputs to a file
PUBLISHED_FROM=f0fe58c9f01ef0c7b491ed0e5f51b983e4119507
2017-02-09 10:33:33 +00:00
Deomid Ryabkov
6f6b12bee7 Lower verbosity of a debug message
PUBLISHED_FROM=6ff979319c31363df16cedf99b2432bd83db1473
2017-02-09 10:21:15 +00:00
Deomid Ryabkov
4e6c2867da UDP fixes: move recv callback into event loop, ...
...and fix a leak where UDP connections with SEND_AND_CLOSE set would not be closed

PUBLISHED_FROM=d60f1fc037e8e57671c7d3146fabc1f068bbb514
2017-02-09 10:21:12 +00:00
Alexander Alashkin
54989e819a Fix multipart parsing
Close cesanta/mongoose#770

PUBLISHED_FROM=ae55988f1c6ccdff172b8db405adb36c91289d95
2017-02-08 10:54:46 +00:00
Deomid Ryabkov
4072062b72 Add MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN
And set to 1024 for mOS.

PUBLISHED_FROM=ee3a66ad935cfb50355ebd7bae59c8230914878d
2017-02-08 08:25:31 +00:00
Alexander Alashkin
d6ba37dc3c Correct msg len for chunked encoding
Close cesanta/dev#6485

PUBLISHED_FROM=172ab4f18f1fb3e6110ad03eea18a7f87f2e531a
2017-02-07 12:25:06 +00:00
Alexander Alashkin
a58d21aa28 Add overrun protection to mg_sock_to_str
Relate to cesanta/mongoose#780

PUBLISHED_FROM=145d94c52be03ac2d909eae8166774ffd40f0df1
2017-02-07 12:25:05 +00:00
Alexander Alashkin
6e8d4129b2 Use _exit in CGI. Close cesanta/mongoose#779
PUBLISHED_FROM=bfe62d3824ee3a6e66b7d1a57ee7bad3b726649d
2017-02-07 11:09:49 +00:00
Alexander Alashkin
2485a8f8d9 Fix signs comparison. Close cesanta/mongoose#774
PUBLISHED_FROM=a875606de6f4b2c202b25ce20efcb1ca33eb75b8
2017-02-07 08:25:31 +00:00
Sergey Lyubka
dfa83f2c85 Fix TCP close sequence
PUBLISHED_FROM=ed6cf7fd63b6f80d5c37ab93899ecd09bac6102b
2017-02-01 20:26:46 +00:00
Alexander Alashkin
91bdbc5193 Fix warn in mg_lwip_if_poll
PUBLISHED_FROM=0bcb3e892e1ba2329aef5d17375fe4d3879dc666
2017-01-31 13:39:29 +00:00
Alexander Alashkin
707b9ed2d6 Remove mg_enable_multithreading. Close cesanta/dev#6511
PUBLISHED_FROM=7864ffa26cb553f5d4a93248f67c288327ec23b0
2017-01-30 13:55:49 +00:00
Deomid Ryabkov
2ea63a0ea6 Limit len of prefix; makes log tidy w/ long names
PUBLISHED_FROM=570530179da327f8bb156bbbd7c557014c1630c1
2017-01-30 09:24:48 +00:00
Deomid Ryabkov
7988acbff4 Raise log level of mbedTLS socket evs to LL_DEBUG
PUBLISHED_FROM=ed0ac4133342c733977e7884a6bbadab7ee74127
2017-01-26 12:38:30 +00:00
Deomid Ryabkov
7bdbd80552 Fix ESP32 encr. OTA; clean up {open,read,close}dir
Fixed a bunch of things to make OTA work on ESP32 with flash encryption:
writes to app aprtitions must be 32-byte aligned and mod 32 in size.
When merging filesystems during update, use spiffs_vfs_* functions so
that old fs is properly decrypted.

Refactored cs_dirent stuff: SPIFFS support moved to spiffs_vfs.c,
added dirent.h on ESP8266 and CC3200 which includes cs_dirent.h
Define DIR and dirent only if asked (ESP8266, CC3200, WIN32).

PUBLISHED_FROM=58b0d05cdc41b1a9e02d341e2a1cdcb012829232
2017-01-24 12:53:35 +00:00
Alexander Alashkin
58b9ee41fa Use LWIP in stm32/cube
PUBLISHED_FROM=da389ddabf96918fd1bc022e0696dbb4542c71c1
2017-01-11 12:37:44 +00:00
Deomid Ryabkov
20370e65d6 Fix parsing of SSL cipher suite specs for mbedtls
The list of cipher suites must be retained while the context is alive.

PUBLISHED_FROM=a3a82e42c1214c54ae1a40fbc49bc26bca32c053
2017-01-10 13:38:08 +00:00
Deomid Ryabkov
67626d49c9 Add ssl_cipher_suites to mg_{bind,connect}_opts
Optional specification of SSL/TLS cipher suites.

PUBLISHED_FROM=e8968c6c7a92f10514d3ee575c2fb9be862e6cf8
2017-01-09 23:53:00 +00:00
Deomid Ryabkov
cd9e179fcb Format for previous commit
PUBLISHED_FROM=609ef3587e4293b0cdbf865cfc466bbb85233361
2017-01-09 17:04:03 +00:00
Deomid Ryabkov
0ba28e6153 Raise verbosity of some log messages
These are not spammy and help debug issues with serving files

PUBLISHED_FROM=84b0ee174314373d472678a14ca87f575fda6e14
2017-01-09 17:04:02 +00:00
Deomid Ryabkov
c55d06ed57 Add directory listing support ot ESP32
PUBLISHED_FROM=336d6b28d6165ece75d25911058ffdd075a3c191
2016-12-23 12:37:07 +00:00
Deomid Ryabkov
54ebcc5bd8 Minor fixes to socket support when used with LWIP
- LWIP UDP sockets are always writable and they are not reported as
   such by select() (bug? featuyre?). TCP sockets are ok.
 - Always deliver MG_EV_POLL, whether we have other fd_events or not.
   Otherwise MG_EV_POLL would not be delivered at all to perma-writable
   UDP sockets (as they are on LWIP).
 - Ignore EAGAIN/EWOULDBLOCK errors while connecting, this happens
   during SSL handshake.

PUBLISHED_FROM=3b1ee0d2b0c672512da5c9d6141aba1112983426
2016-12-21 13:06:21 +00:00
Alexander Alashkin
02499d672b Build c_mqtt/stm32 - part 1, with stubs
PUBLISHED_FROM=de4b9f3e9eeafa75bb8919abacd86fb23fdefc1b
2016-12-15 14:06:50 +00:00
Alexander Alashkin
8c2e641ed7 Simplest c_hello/stm32
PUBLISHED_FROM=3a22eb96ff011ef8327cd1b78b56a3af86ba2c84
2016-12-14 16:22:16 +00:00
Sergey Lyubka
a447ae5eab MQTT parsing fix
PUBLISHED_FROM=41f43cb0e707259740de3346308f746c2a3778fd
2016-12-13 10:37:06 +00:00
Dmitry Frank
5ebff5d15e Rename pic32_harmony -> pic32
PUBLISHED_FROM=00ca7b2adabde94a683ac4d33be1f2bdbb17772f
2016-12-09 22:06:14 +00:00
Dmitry Frank
731512a947 Define mg_file_upload_handler() only if needed
Namely, define it if only `MG_ENABLE_HTTP_STREAMING_MULTIPART` and
`MG_ENABLE_FILESYSTEM` are on

PUBLISHED_FROM=3094738a4b76ceb09a3c2374e8d9d914b71c3441
2016-12-09 16:06:17 +00:00
Alexander Alashkin
304dbca63d Fix miot-mbed errors and warning, part 3
PUBLISHED_FROM=2f6fb7ea5abdcd4ca9b06956172938ee3bc28459
2016-12-09 12:36:00 +00:00
Marko Mikulicic
9937e88985 Fix comparisons
PUBLISHED_FROM=4d86de7f73ef9d4c0f236e1fe1201e5de792f19f
2016-12-07 18:05:56 +00:00
Sergey Lyubka
57f964a139 Add mqtt last will
PUBLISHED_FROM=fb856714ead67390dfd7ce9d208ae5ae19ce7c6d
2016-12-07 17:21:56 +00:00