Commit Graph

1217 Commits

Author SHA1 Message Date
Alexander Alashkin
8a6cf95fad Fix mg_match_prefix
PUBLISHED_FROM=4fdfa61e7b3b62083b0ac8fe74dd2dd3793f50fe
2016-11-15 13:36:31 +00:00
Dmitry Frank
37a7031f4e Minor formatting fix
PUBLISHED_FROM=c56b4ae00c454e6931ab29b095641bf0222f860c
2016-11-15 09:51:14 +00:00
Dmitry Frank
8874f3de9d Fix simplelink SSL context
It wasn't checked for `NULL`, and on CC3200 NULL dereferencing addresses
doesn't cause a crash, so it worked by pure luck: ctx->ssl_key was 0.
After `mg_` to `miot_` refactoring it's not the case anymore (presumably
because linker arranged objects in a different order), so this bug shown
up.

PUBLISHED_FROM=0f1cc73a078c18432c68ae0f9b14dd06b3bb4279
2016-11-15 09:06:03 +00:00
Marko Mikulicic
3c5d48ea13 Promote tun example to a unit test
PUBLISHED_FROM=0454cdeec5c7120eb4bf905fdd5b7abdcb4003c2
2016-11-14 18:06:04 +00:00
Marko Mikulicic
74b75899d3 Make cc3200 sprintf workaround smaller
in light of the root cause discovered by rojer
and addressed in cesanta/dev#5882 for the http connection code path.

PUBLISHED_FROM=aea563150a0411cbe3fdc6f7911529f3136cc76f
2016-11-14 17:06:31 +00:00
Deomid Ryabkov
240eca0b68 Avoid passing NULL to %.*s
CC3200 (TI's C library) doesn't like it

https://e2e.ti.com/support/development_tools/compiler/f/343/t/554883

PUBLISHED_FROM=d0e9fb7ebb7d189d1a76451d609f1f1861c7a837
2016-11-14 16:20:08 +00:00
Deomid Ryabkov
65e01dbabc Initial support for mbedTLS
PUBLISHED_FROM=edb1063d3fd64e3c732f16b8bf101c065cdacddd
2016-11-14 16:20:02 +00:00
Deomid Ryabkov
f67fe352cf Pull out common SSL interface
Currently only OpenSSL API impl, but the plan is to add more.

PUBLISHED_FROM=c85b26fa2312047768bdcf3eca583e60862aba90
2016-11-11 20:51:01 +00:00
Marko Mikulicic
4805797752 Fix hexdump memory overflow
PUBLISHED_FROM=a6f3f33432ce43b6d4462de623ba61a53e7f18df
2016-11-11 16:05:53 +00:00
Marko Mikulicic
4c038508f2 Extract tun proto name constant
PUBLISHED_FROM=574362ea7d90a17cd49963a430559824cfcff802
2016-11-11 10:06:02 +00:00
Marko Mikulicic
15db11c0e6 Fix tunnel teardown
PUBLISHED_FROM=2c23e4a4dfc7129da657c5935f06335fc022394a
2016-11-11 08:21:37 +00:00
Deomid Ryabkov
97fe505bb4 clang-format more stuff in common
PUBLISHED_FROM=8b5c6f70d5582402f327c4da7baee7cc15ee13aa
2016-11-10 23:50:42 +00:00
Deomid Ryabkov
fd45a6d31b CS_LOG_TS_DIFF -> CS_LOG_ENABLE_TS_DIFF; ifdef->if
PUBLISHED_FROM=48c8d4326ea8a24edd8d1ca011be9e7643219084
2016-11-10 16:21:28 +00:00
Marko Mikulicic
e1a9ad7f82 Overload mg_bind to bind to tunnel
PUBLISHED_FROM=f554cc63dfea12455fe5e428c6ce5f3152774f8e
2016-11-10 13:07:17 +00:00
Deomid Ryabkov
296affc6e4 Make Krypton define KR_VERSION; use it to detect
PUBLISHED_FROM=ea039cdc30aec44db074871ff6b2d2582f98b5c9
2016-11-10 11:50:56 +00:00
Marko Mikulicic
1889e12b54 Support username:pass authority in HTTP/WS urls
PUBLISHED_FROM=39a1c2a271c5cd961670e11c830105c17ba0b2e4
2016-11-10 11:21:43 +00:00
Sergey Lyubka
5e91d919e0 Make mg_register_http_endpoint work for websocket
PUBLISHED_FROM=5bf5a007929b3b6275121f3cf949526e881fb482
2016-11-09 17:21:38 +00:00
Marko Mikulicic
5934846852 Make mg_tun_bind take separate user+pass
PUBLISHED_FROM=3ee9478275c4b9253b1dd4f98a69cecc89290bce
2016-11-09 15:51:08 +00:00
Marko Mikulicic
5045dfab74 Mongoose TCP tunnel
PUBLISHED_FROM=f03b963aaec02574e47c28ee8033551440b94f2d
2016-11-09 15:05:46 +00:00
Alexander Alashkin
499a7d6a37 Fix mg_is_error
PUBLISHED_FROM=80481f8dbcb93d04eee51ecc6366949420a61f2f
2016-11-09 13:50:52 +00:00
Alexander Alashkin
f72c3fa9a7 Unbreak PIC32 compilation. Close cesanta/dev#5807
PUBLISHED_FROM=cfd7de45e4357a17719501b8ab004c2edbd3e87e
2016-11-09 11:21:02 +00:00
Alexander Alashkin
d0c50632cd Fixes in MQTT for AWS support
PUBLISHED_FROM=2b82f3793b3c6d0cf1266e4cc0e67930f43002c5
2016-11-09 10:05:40 +00:00
Marko Mikulicic
fffb54e2c6 Implementing MG interfaces
PUBLISHED_FROM=46496c2d5340a0bbe4fe1c6c9ff187bc65d2d35f
2016-11-08 22:36:13 +00:00
Dmitry Frank
76bb35d5db Adjust udp_recv callback type for nRF5x
PUBLISHED_FROM=66db56192ae710e3f865fef47593b49e0ed4f133
2016-11-04 17:35:37 +00:00
Deomid Ryabkov
fd763846e5 TI Tiva TM4C129 support and example project
PUBLISHED_FROM=c3d59657adff247f565bf0be59192e32d5d0bbf6
2016-11-02 18:55:04 +00:00
Alexander Alashkin
f4f310cf51 Add WinCE example, update Mongoose for WinCE6.0
PUBLISHED_FROM=2a76ccddb62b63caeaca3785a07d7d0b94125eaf
2016-11-02 10:11:20 +00:00
Deomid Ryabkov
39a17f8a72 Add text msgs for HTTP status codes 400 and 503
PUBLISHED_FROM=1bd3308933354e147c4e8aa375728a1ede6d8ab4
2016-11-01 18:10:46 +00:00
Deomid Ryabkov
78454da3b3 BREAKING: Set MG_F_SEND_AND_CLOSE on UDP conns
Long-lived UDP "connections" i.e. interactions that involve more
than one request and response are rare, most are transactional:
response is sent and the "connection" is closed. Or - should be.
But users (including ourselves) tend to forget about that part,
because UDP is connectionless and one does not think about
processing a UDP request as handling a connection that needs to be
closed. Thus, we begin with SEND_AND_CLOSE flag set, which should
be a reasonable default for most use cases, but it is possible to
turn it off the connection should be kept alive after processing.

PUBLISHED_FROM=1677d8024aa9afa7e18d8a04d829b699f7f2f103
2016-11-01 14:26:00 +00:00
Deomid Ryabkov
6a12bd7abc Wrap LOG and DBG in do { ... } while(0)
PUBLISHED_FROM=c4f3d44ed16dba60db3198b90478c1b2e6f2a5c1
2016-10-31 20:11:37 +00:00
Deomid Ryabkov
92b15395a4 Add CS_P_NXP_LPC - platform def for NXP LPC MCUs
PUBLISHED_FROM=d6ed793313a98545d5a89faafc8526b658ffff66
2016-10-28 18:12:08 +00:00
Marko Mikulicic
f2e7facbc3 Fix master build
amalgamation, ansi C and queue.h usage issue

PUBLISHED_FROM=96a2b8a90d590da0f2d9939c1d2bc7a64d1fe36a
2016-10-28 14:29:58 +00:00
Sergey Lyubka
f1b4f0c463 Fix SEGFAULT in MQTT server
PUBLISHED_FROM=6455082726781aab819a7f8645e81adaa7fc7669
2016-10-28 14:12:40 +00:00
Dmitry Frank
c04e3f80b9 Make mongoose compile for nRF51
PUBLISHED_FROM=6af3ed56802d2619f673c36059370440a0c06397
2016-10-28 11:08:09 +00:00
Deomid Ryabkov
5c9f463cab Add MG_EV_HTTP_MULTIPART_REQUEST_END
This event is sent at the end of the request

PUBLISHED_FROM=0b841a26320e3edbf73126e2ed8d286d4e5f3fa8
2016-10-27 18:09:57 +00:00
Sergey Lyubka
3a8f47befd Mqtt: parsing auth info in the connect message
PUBLISHED_FROM=017e707ea2bd7b1d1972fbb92e5d98c74e17e9d0
2016-10-27 17:53:17 +00:00
Marko Mikulicic
a3e2a41834 Improve error reporting of mg_connect_http
PUBLISHED_FROM=8149fc5ab3c6f7d6ec360473f0e6847040ca820b
2016-10-27 15:22:31 +00:00
Dmitry Frank
b667bd709d Specify void arguments explicitly
PUBLISHED_FROM=345ac55417a9b012e89244d36bfb9ebf8e908637
2016-10-27 12:37:38 +00:00
Marko Mikulicic
a4c668e37a Expose reverse proxy API for dynamic mounts
PUBLISHED_FROM=00772400bce7c15368d91741092ebc8ab0842e19
2016-10-27 12:08:05 +00:00
Marko Mikulicic
900bbe724a Mongoose forwarding
PUBLISHED_FROM=51652f0157bb951a43508f0fe948c62c351e96ba
2016-10-26 14:52:10 +00:00
Alexander Alashkin
06b430e57f PIC32 Harmony TCP/IP support basics
PUBLISHED_FROM=31f8f61de954fa3a36ebad162bdb730c0db95b58
2016-10-26 12:00:13 +00:00
Sergey Lyubka
99377bdd30 Fix user registration flow
PUBLISHED_FROM=bac8c10063215f7f7163f607213d15a3c5f81552
2016-10-26 11:02:09 +00:00
Marko Mikulicic
c151f9bc59 Denoisify mongoose poll logging
PUBLISHED_FROM=ec1cb82cc2404cfe2abdf3bd445ddec3d4ff3e57
2016-10-25 16:55:50 +00:00
Deomid Ryabkov
204bf9acec Krypton + LWIP fixes
* Make kr_{send,recv} report status via return code instaed of errno
 * Move mg_if_* recv and connect callback invocation out of LWIP
   callbacks: these can be nested and we don't want that to happen
   to our callbacks. Instead, we post events for the event manager to
   process during next poll.

PUBLISHED_FROM=9b3c1de796fae381dea1641807e51d7a897a398e
2016-10-25 15:30:04 +00:00
Dmitry Frank
e3bac87016 Make mongoose compile with ARMCC
(It compiles, but doesn't really work yet)

PUBLISHED_FROM=0382d355a343bdab9c9eeed87229efe90c30c40b
2016-10-25 09:56:40 +00:00
Sergey Lyubka
7f99013179 Make backend build under win32, MSVC98
PUBLISHED_FROM=961e25e133eff8ee168557f186713d5babbd0c5f
2016-10-24 21:49:11 +00:00
Alexander Alashkin
835af2cae1 Fix CoAP/CC3200 compilation
PUBLISHED_FROM=00e4c01cc2bccd63b0f18b797e2c0503a489ef6f
2016-10-21 15:57:55 +00:00
Ilia Penev
fcc75c6a3f Fix CoAP packet size calculation
PUBLISHED_FROM=43532ec3951779d17438b457fe6de6dea8f514fd
2016-10-21 12:13:10 +00:00
Marko Mikulicic
5bd3df7a0f Fix mg_time on mbed and make DNS work around epoch
PUBLISHED_FROM=c1aeef9dc25baba794b3269b44441c5bafbca5a8
2016-10-20 22:36:39 +00:00
Dmitry Frank
85d6292b8f Add nRF port for Mongoose
Example is not yet added

PUBLISHED_FROM=2732386091a0d4cd8d4c6e64dc16467780ec72a5
2016-10-19 19:22:15 +00:00
Deomid Ryabkov
7b05d70042 CS_P_ESP_LWIP -> CS_P_ESP8266;add CS_P_NXP_KINETIS
LWIP part has been finally fully split from the ESP part, and ESP
platform defs reduced to bare minimum. It is now possible to use LWIP
in either low-level or socket mode without any ESP dependencies,
and NXP Kinetis platform is the first to make use of it.

PUBLISHED_FROM=4a9055897609c812296bdab5b4943ffde641ced2
2016-10-18 12:38:06 +00:00