Commit Graph

108 Commits

Author SHA1 Message Date
Assaf Inbal af01dcb7da Added retain flag for publishing 2022-09-10 22:30:49 +02:00
Brent Rubell 37e175dcef
Merge pull request #196 from xdylanm/send_long_packet_fix
Fixed length calculation when payload exceeds 128bytes
2021-07-12 09:53:02 -04:00
xdylanm a2bdbacb17 format 2021-05-30 16:16:14 -07:00
xdylanm b007806ac1 Fixed length calculation when payload exceeds 128bytes 2021-05-30 14:13:57 -07:00
Ricardo Gorosito ab78b291b2 more c formatting fixing 2021-05-25 13:23:51 -03:00
Ricardo Gorosito 986c1b405c fix c formatting 2021-05-25 13:16:43 -03:00
Ricardo Gorosito 4cb40f87d2 stop loosing messages 2021-05-23 15:52:35 -03:00
brentru 86aff92f0b fixup 2021-05-18 16:43:33 -04:00
brentru a1e64c039e settable keepalive interval 2021-05-18 16:41:26 -04:00
xdylanm db003d30d1 Addressing comments from PR #193 with merge from PR#166. Clang-format, version ticked to 2.3.0, replaced duplicate topicOffsetFromLength with packetAdditionalLen. 2021-05-14 08:09:07 -07:00
xdylanm c782cc454f Merge branch 'master' of https://github.com/adafruit/Adafruit_MQTT_Library into send_rcv_long_packets
Pull in changes from flavio-fernandes
2021-05-14 07:47:38 -07:00
xdylanm 93a35d1a3e fix typo 2021-05-12 21:54:08 -07:00
xdylanm 2ea8a0b3fc Support publishing and receiving large messages. Send multiple 250 byte packets (ref PR#113) for larger messages. Correctly identify topic start position for >127byte messages (ref PR#166). Resolves issue #102 2021-05-12 21:31:22 -07:00
Flavio Fernandes d6f07ed4e4 Adafruit_MQTT::publishPacket: Protect against memory corruption.
Avoid memory corruption from happening when data payload provided
in Adafruit_MQTT::publishPacket is greater than MAXBUFFERSIZE.

In order to do that, a helper function is being added to calculate
how much space is available for the payload after subtracting what
is used as the header.

Pull request https://github.com/adafruit/Adafruit_MQTT_Library/pull/166
Fixes https://github.com/adafruit/Adafruit_MQTT_Library/issues/109
Fixes https://github.com/adafruit/Adafruit_MQTT_Library/issues/122

Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
2021-04-02 12:14:39 -04:00
Lucas Jandrew f3f5c18c6d Reformatted with clang-format 2020-11-06 10:20:52 -05:00
Lucas Jandrew c952333c40 Removing commented out debug statements 2020-11-05 13:06:12 -05:00
Lucas Jandrew 7e0a1573ea Merge master to resolve conflicts 2020-11-05 13:04:17 -05:00
Morgan f1f515651f
Moved defined(ARDUINO_SAMD_MKR1010) to line 25
Move "defined(ARDUINO_SAMD_MKR1010)" from lilne 24 to line 25
2020-09-23 10:27:06 +01:00
Morgan 4b360f2522
Added support for the MKR1010
Added support for the Arduino MKR1010
2020-09-23 09:51:56 +01:00
Brent Rubell 4a409caf16
Merge branch 'master' into better-ping-handling 2020-08-04 10:38:19 -04:00
dherrada 148cfb3591
Moved to actions, no doxygen 2020-06-25 09:56:46 -04:00
Lucas Jandrew 9bf437e61c Fix missing handleSubscriptionPacket from code formatting. 2020-02-24 01:41:00 -05:00
Lucas Jandrew adb717f7dd Removing remainder of whitespace differences 2020-02-24 01:28:48 -05:00
Lucas Jandrew 3ba30fe64b Revert code formatting changes by CLion 2020-02-24 01:22:58 -05:00
Lucas Jandrew 44199a17ee Fixes issue with client erroneously reading a byte from 0 length packets 2020-02-24 01:10:09 -05:00
Lucas Jandrew 0b8488d9bf Uncommented code to handle subscription packets... 2020-02-23 22:44:35 -05:00
Lucas Jandrew 5ea3e3ba72 Handle publish packets when they're not the expected packet type 2020-02-23 22:42:43 -05:00
Lucas Jandrew 259cba0837 Adds retain support for publishing messages 2020-02-19 19:15:27 -05:00
brentrubell b7838a3278
Merge pull request #148 from ACE1046/master
Message type check in readSubscription (#147)
2019-04-16 11:49:27 -04:00
brentrubell 9eb37efa1c
bumping library for compilation on m4 targets (#151) 2019-04-16 11:48:54 -04:00
Anton ACE 417d342078
Message type check in readSubscription (#147)
Added message type checking in readSubscription
https://github.com/adafruit/Adafruit_MQTT_Library/issues/147
2019-03-14 17:54:06 +03:00
brentrubell 61f75246f4 Library Fixes (#127)
* Removing warnings

* handle reading zero-length packets

* updating travis to exclude archived libraries, addin Arduino WiFi101 lib instead

* adding esp lib to travis

* restrict builds to current hardware platforms

* travis, esp8266: skip esp target for non-esp-based examples

* adding test skips for zero, fixing fingerprint error

bump library version
2018-08-20 09:56:40 -04:00
Todd Treece 3553074d45 bump lib to 0.17.0 2016-12-29 16:09:07 -05:00
Todd Treece b61d7e7024 remove flashstring helper constructors & methods 2016-08-15 13:05:51 -04:00
ladyada bdd08d443e fix esp, remove debug 2016-08-09 21:37:07 -04:00
ladyada 4b57d0ddcb remove progmem support (only FONA really needed it and its OK) 2016-08-09 15:52:08 -04:00
ladyada 5f3a1e2322 drop progmem support 2016-08-09 14:21:46 -04:00
Todd Treece 49eda71d17 fix io callback scope issue 2016-07-29 15:06:54 -04:00
Todd Treece 0bfffa1571 access callback_io via ->* 2016-07-29 10:54:30 -04:00
Todd Treece ad83c09d20 add new sub callback typedef for io wrapper 2016-07-29 09:27:00 -04:00
Todd Treece f793f8d2d0 allow unauthenticated connections to mqtt brokers 2016-07-13 15:57:00 -04:00
ladyada 9b23f6747e make sure we get all 32 bits printed out 2016-07-13 13:52:23 -04:00
ladyada 82873050b6 add error output on dropped packets, and mqtt w/callbacks example 2016-07-08 17:16:07 -04:00
ladyada 4269d87492 callback support 2016-07-08 17:01:40 -04:00
ladyada 9ed79466b2 shorter suback timeout 2016-07-08 15:21:47 -04:00
ladyada bb240928e8 fix for extra float zero-terminator https://github.com/adafruit/Adafruit_MQTT_Library/issues/35 2016-07-06 18:37:11 -04:00
ladyada 5d133c3852 updated publish half for long packet sendings! 2016-07-06 18:32:21 -04:00
ladyada b26b4eb32c max receivable MQTT packet is 16 bits (tested with 300 byte packet receive)
also fixd buffer printer to have 16 bit length
2016-07-06 17:20:02 -04:00
Todd Treece af8ec63ce6 add new mqtt error codes for connack 2016-06-24 17:02:57 -04:00
ladyada 58f5d0cda6 also fixed 'multiplier overflow' bug - YAY COMPILERS 2016-06-07 22:39:07 -04:00