1
0
mirror of https://github.com/FreeRTOS/coreMQTT synced 2025-06-28 22:59:29 +08:00

446 Commits

Author SHA1 Message Date
Nicholas Rodgers
f756d9833a
Update litani and starter kit submodules (#158)
Update litani to version 1.6.0 and starter kit to tip of tree
2021-03-30 11:12:36 -07:00
Archit Aggarwal
6b1336f662
Update release job to support deleting duplicate tag and release (#156)
* Update release job to support deleting existing tag and release

* Update conditional for tag-commit job

* Update default value to be a string

* Update parameter description

* Fix typo

* Fix whitespace
2021-03-03 15:11:09 -08:00
Muneeb Ahmed
b6c4ae8b27
Change http links to https (#155) 2021-03-02 12:25:58 -08:00
Archit Aggarwal
ffb68182ab
Update URL to memory estimates in README (#154) v1.1.1 2021-02-28 10:36:41 -08:00
Archit Aggarwal
363a2fbca2
Update CHANGELOG and file versioning for upcoming release (#153) 2021-02-25 13:56:58 -08:00
leegeth
77ab18a4ed
Use python 3.7.10 memory estimator (#152)
* Use python 3.7.10 for doxygen and link verifier.
2021-02-18 17:20:58 -08:00
Archit Gupta
81f265d6a5
Add workflow to generate doxygen size tables (#151)
* Add manual workflow for generating size table
* Add memory statistics PR check
2021-01-22 13:40:27 -08:00
David Chalco
1a201a1fe6
Example code - fix incorrect struct member (#150) 2021-01-19 13:26:07 -08:00
Mark R. Tuttle
48ab9456f7 Update litani submodule 2021-01-11 20:30:22 -05:00
Archit Aggarwal
103b5daa86
Update CI workflow to use new action for coverage check (#146)
Use the coverage-cop custom GitHub action for coverage compliance check of branch and line coverages of unit tests.
2020-12-24 10:41:40 -08:00
Archit Aggarwal
e995d36a00
Update CI checks workflow to use GitHub Actions for quality checks (#145)
Migrate coreMQTT to use the actions for code quality checks in FreeRTOS/CI-CD-GitHub-Actions
2020-12-23 16:37:28 -08:00
leegeth
221687abfc
Update memory numbers in Doxygen to be in sync with FreeRTOS.org (#143) 2020-12-22 18:11:47 -08:00
Archit Aggarwal
843cf9924f
Update timeout section in doxygen manual to match API behavior in v1.1.0 (#142)
Update the sub-section of the Design page of the library API reference to provide detailed information about the role of runtime timeout and compile-time timeout configurations in the behavior of MQTT_Connect, MQTT_ProcessLoop and MQTT_ReceiveLoop functions.
2020-12-17 14:53:46 -08:00
Archit Aggarwal
ff9830a338
Update README with LTS information (#141) v1.1.0 2020-12-15 06:53:55 -08:00
SarenaAWS
3ef8ac1f77
Add Doxygen doc words to the lexicon.txt. (#140) 2020-12-13 10:01:57 -08:00
Muneeb Ahmed
e9f7c38736
Update Changelog for v1.1.0 (#129) 2020-12-11 15:47:07 -08:00
Archit Aggarwal
84e0c7e95e
Add section about metrics reporting in README (#137)
* Add section for reporting metrics in README
2020-12-11 10:55:28 -08:00
Muneeb Ahmed
096ec21c55
Check for empty topic filters in subscribes (#139)
* Validate each topic filter in a subscribe or unsubscribe packet is of nonzero length
2020-12-11 01:26:18 -08:00
leegeth
82eea34765
Update timeout doc (#138)
Co-authored-by: Archit Aggarwal <architag@amazon.com>
2020-12-10 17:40:05 -08:00
Archit Aggarwal
c7a2c898b3
Update API documentation of transport send/recv functions (#136)
Update API of the transport interface functions for the following:

* Transport recv() should NOT block when requested to read a single byte. It MAY block for the underlying socket timeout when requested to read n > 1 bytes.
* Transport send() should NOT return an error when the send fails because of a full TX buffer of the underlying network stack, so that the calling library can retry the send operation.
2020-12-09 22:25:48 -08:00
SarenaAWS
cf7406a98c
Add the current version as a macro to the library. (#135)
So that the version can be used in metrics collection and anywhere else it is needed.
2020-12-09 17:25:50 -08:00
SarenaAWS
d96960ec8d
Update v1.0.1 to v1.1.0 and 202011.00 to 202012.00 for memory estimates link. (#131) 2020-12-09 11:33:30 -08:00
Archit Aggarwal
9ef7fe91c1
Add doc that keep-alive is unsupported with dummy timer (#132)
Update API doc to mention that the keep-alive mechanism is not supported by MQTT_ProcessLoop API when a dummy timer function that always returns zero is supplied to the library.
2020-12-09 10:57:07 -08:00
leegeth
ecf9b73e1e
Add timeouts in doxygen docs (#133)
Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
2020-12-09 10:30:02 -08:00
Muneeb Ahmed
fdfb78df4b
Remove references to MQTT from readme headers (#130)
* Remove references to MQTT from readme headers

* Move parenthesis
2020-12-08 21:42:13 -08:00
Archit Aggarwal
037a2510c6
doc: add info to set timeout configs to zero when timer is dummy (#128) 2020-12-08 15:29:18 -08:00
Archit Aggarwal
510a3f6eca
Update APIs to detect partial sends as failures (#127)
* Fix issue of data recv being interrupted

* Rename elapsedTimeMs variable to its express its new meaning

* Use configuration const for recvExact timeout

* Remove timeout check from discardPacket and address CI check failures

* Fix more CI check failures

* Remove another unused local variable

* Re-instate timeout in discard to reduce scope of changes

* Remove unused variable again

* Fix failing unit test

* Rename new config macro, and attempt to fix CBMC failures

* Doc: Improvement suggestions from code review

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

* Fix quality check failures

* Add test case to check partial network reads with zero timeout duration for ProcessLoop

* style: Improving naming

* Address complexity failure

* Address comments

* Doc: Add blocking time equation of Receive/ProcessLoop functions in their API doc

* Improvement in API doc

* Set MQTT_RECV_POLLING_TIMEOUT_MS so that recvExact runs in one iteration always for cbmc.

* doc: Add information about zero return value for Transport_Recv_t

* fix: prevent possibility of infinite loop in timeout logic of ProcessLoop

* style: Minor changes

* hygiene: minor name fix

* fix: Possibility of infinite loop in sendPacket

* Add the new configuration to doxygen

* test: Add mock transport send function that always returns zero

* fix: Issues in sendPacket and sendPublish

* test: add test for sendPacket timeout

* Update Timer Overflow test

* test: temporarily comment out unused variable

* test: fix the timer overflow test

* Address review comments

* style: make log messages concise

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

* Update call sites of sendPacket to treat partial sends as failure

* test: Add send timeout coverage for APIs calling sendPacket

* test: Add coverage for send timeout in APIs calling sendPacket

* test: review feedback

* ci: address spell check error

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Sarena Meas <sarem@amazon.com>
2020-12-07 16:02:39 -08:00
Archit Aggarwal
c0cba82ded
Fix tag verification when using commit SHA (#126) 2020-12-07 13:19:19 -08:00
Archit Aggarwal
0a2172b896
Fixes in internal logic of sending packets (#124)
* Fix issue of data recv being interrupted

* Rename elapsedTimeMs variable to its express its new meaning

* Use configuration const for recvExact timeout

* Remove timeout check from discardPacket and address CI check failures

* Fix more CI check failures

* Remove another unused local variable

* Re-instate timeout in discard to reduce scope of changes

* Remove unused variable again

* Fix failing unit test

* Rename new config macro, and attempt to fix CBMC failures

* Doc: Improvement suggestions from code review

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

* Fix quality check failures

* Add test case to check partial network reads with zero timeout duration for ProcessLoop

* style: Improving naming

* Address complexity failure

* Address comments

* Doc: Add blocking time equation of Receive/ProcessLoop functions in their API doc

* Improvement in API doc

* Set MQTT_RECV_POLLING_TIMEOUT_MS so that recvExact runs in one iteration always for cbmc.

* doc: Add information about zero return value for Transport_Recv_t

* fix: prevent possibility of infinite loop in timeout logic of ProcessLoop

* style: Minor changes

* hygiene: minor name fix

* fix: Possibility of infinite loop in sendPacket

* Add the new configuration to doxygen

* test: Add mock transport send function that always returns zero

* fix: Issues in sendPacket and sendPublish

* test: add test for sendPacket timeout

* Update Timer Overflow test

* test: temporarily comment out unused variable

* test: fix the timer overflow test

* Address review comments

* style: make log messages concise

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Sarena Meas <sarem@amazon.com>
2020-12-07 10:37:26 -08:00
Oscar Michael Abrina
4f7d1b9f9e
Enable debug logging in unit-test build and fix logging compilation error (#125)
- Update core_mqtt_config.h to specify logging level as LOG_NONE
- Update GA to set logging level as LOG_DEBUG
- Fix compile error in LogDebug of recvExact
2020-12-06 18:09:58 -08:00
Archit Aggarwal
b581fc4172
Bugfix: Fix interrupted network read operation (#120)
### Problem

The `MQTT_ProcessLoop` and `MQTT_ReceiveLoop` read incoming MQTT packet payload over the network by calling the `recvExact` function. The `recvExact` function can be called multiple times to read the expected number of bytes for the MQTT packet but it also implements a timeout functionality of receiving the expected number of payload within the timeout value passed to the function.
This causes problems when the `Transport_Recv` call returns less than requested number of bytes, and there is a timeout (for example, when calling `MQTT_ProcessLoop` with 0ms duration) which causes the function to assume failure instead of reading the remaining payload of the MQTT packet by calling `Transport_Recv` again. Thus, in such cases, the MQTT connection is severed prematurely even though there is a high probability of receiving the remaining bytes of the MQTT packet over the network.

### Solution
Instead of implementing a timeout on the entire duration of receiving the expected number of remaining MQTT packet bytes in `recvExact`, the use of timeout is being changed to be relevant only on the total time of receiving 0 bytes over the network over multiple calls to `Transport_Recv`.
As this modified meaning of the timeout duration is now unrelated to the timeout duration that the `MQTT_ProcessLoop` or `MQTT_ReceiveLoop` functions are called, a new configuration constant for the `recvExact` timeout value, `MQTT_RECV_POLLING_TIMEOUT_MS`, has been added to the library which will carry a default value of 10ms. 

Co-authored-by: Sarena Meas <sarem@amazon.com>
2020-12-04 19:49:40 -08:00
Kareem Khazem
77e7c0168a
Update litani submodule pointer (#108)
This update ensures that final proof results get posted to GitHub even
when there are proof failures.
2020-12-04 11:35:06 -08:00
Muneeb Ahmed
73472634c6
Use stdbool.h always(#118)
* Add custom stdbool.readme file

* Add custom stdint.readme file

* Add GitHub Action to test .readme headers

* Tested GA by pushing an invalid file
2020-12-04 10:26:49 -08:00
Archit Aggarwal
8431dbe061
Automate release of coreMQTT with GitHub Action Job (#121)
Add a GitHub Action job to trigger a release process which includes operations of:

1. Creating and pushing the release tag to the repository
2. Verifying the pushed tag (performing a diff with the commit ID which is tagged)
3. Creating a ZIP for the release asset.
4. Verifying the ZIP by performing a diff check and running unit tests on the unzipped files. 
5. Creating a release on the repository for the tag, and uploading the ZIP as the release asset
2020-12-04 10:19:46 -08:00
Oscar Michael Abrina
8de05fa001
Fix typo in MQTT_Unsubscribe code example (#122)
This fixes a typo in the code example that was raised in issue #119
2020-12-04 10:00:31 -08:00
Muneeb Ahmed
ca492a40f0
Fix incorrect size compiler warning (#116) 2020-12-01 19:17:48 -08:00
Muneeb Ahmed
e1b81ae409
Remove %.*s format specifier from logs (#117) 2020-12-01 18:16:53 -08:00
Archit Gupta
9fd9e23774
Add CONTRIBUTING.md (#115)
* Add CONTRIBUTING.md

* Update README

* Make links https
2020-11-30 13:51:19 -08:00
Oscar Michael Abrina
de4edcd578
Cast variable type based on format identifier (#113)
Update logs to only ever use base format specifiers and cast to the standard C type to minimize compilation warnings.
2020-11-24 14:34:28 -08:00
SarenaAWS
4b8674a806
Update all references from master to main. (#110) 2020-11-18 12:27:01 -08:00
SarenaAWS
19769bbb73
Add git-secrets check to GHAs. (#109) 2020-11-13 11:40:49 -08:00
Archit Gupta
f7cfaeb107
Add CRLF check to formatting check (#107) 2020-11-05 17:33:52 -08:00
Muneeb Ahmed
918d8bcbe8
Change case of security.md (#104) v1.0.1 2020-11-04 12:11:48 -08:00
SarenaAWS
5fff2c0ed4
Add missing parenthesis. (#103) 2020-11-04 10:50:24 -08:00
Sukhmani Minhas
3d4a123fcb
Add README link to memory estimates doxygen page (#102) 2020-11-03 22:38:57 -05:00
Sukhmani Minhas
7c2361792c
Update memory estimates for the coreMQTT source code using the ARM GCC toolchain. (#101) 2020-11-03 12:16:50 -08:00
SarenaAWS
66a35e4213
Update version v1.0.0 to v1.0.1. (#97) 2020-11-02 12:11:10 -08:00
Muneeb Ahmed
a9c5695b34
Update CHANGELOG for v1.0.1 (#98)
* Update CHANGELOG for v1.0.1

Co-authored-by: SarenaAWS <6563840+sarenameas@users.noreply.github.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
2020-11-02 11:58:11 -08:00
SarenaAWS
253ab295ff
Remove the memcpy function body in MQTT_Connect and MQTT_SerializeConnect proofs. (#96)
* Add missing function body removal for memcpy to MQTT_Connect and MQTT_SerializeConnect proofs.
2020-11-02 00:32:24 -08:00
Archit Aggarwal
25cdcd6f07
Add security.md (#100) 2020-10-30 17:47:59 -07:00