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

446 Commits

Author SHA1 Message Date
abhidixi11
70a2697c91 fix: MISRA 15.1 (goto) violations - part 2 (#718)
* fix: MISRA 15.1 (goto) violations - part 2

This PR has changes for iot_mqtt_api.c, iot_mqtt_operation.c. and iot_mqtt_subscription.c.
2020-01-17 09:44:03 -08:00
abhidixi11
acd02af830 fix: MISRA 15.1 (goto) violations - part 1 (#717)
* fix: MISRA 15.1 (goto) violations - part 1

Remove gotos, fix a unit test failure.

* fix: MISRA 15.1 (goto) violations - part 1

Remove gotos, fix a unit test failure.

* fix: MQTT remaining length test.

Three bytes need to have continuation bit set.

* Update iot_mqtt_network.c
2020-01-13 18:00:54 -08:00
Muneeb Ahmed
e28b3b183a Refactor MQTT operations for complexity (#700)
* Refactor MQTT operations for complexity

* Refactor _IotMqtt_AddSubscriptions for complexity

* Minor comment fix

* Address review comments

* Revert change to  _IotMqtt_ProcessKeepAlive

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
2020-01-13 15:50:51 -08:00
Sarena Meas
b227f1dcd7 MISRA Directive 4.6 on MQTT Files (#711)
* Ignore MISRA directive 4.6 in iot_atomic_gcc.h

* MISRA Directive 4.6 on MQTT files and logging.

* Add comments to coverity annotations.

* Elaborate the iot_atomic_gcc.h comments about annotations.

* Add IotLog() to the lexicon.txt for mqtt.

* Fix grammar on coverity comments.

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
2020-01-13 15:23:58 -08:00
Sarena Meas
4bc49e0fed MISRA Rule 10.1 on all MQTT library files. (#712) 2020-01-13 12:57:31 -08:00
abhidixi11
7b075bf0b8 fix: Increase MQTT test code coverage. (#713)
* fix: Increase MQTT test code coverage.

Code coverage for file: iot_mqtt_network.c
2020-01-10 15:40:05 -08:00
Muneeb Ahmed
94887b2f35 Reduce complexity in MQTT serialize and API (#701)
* Refactor Wait and PublishAsync API functions

* Refactor _IotMqtt_DeserializePublish

* Move publish setup checks to iot_mqtt_validate.c
2020-01-09 11:23:42 -08:00
abhidixi11
3fefcfda96 fix: IotMqtt_Wait Error Handling and increased MQTT code coverage
* fix: "Fixed error handling case in IotMqtt_Wait and increased MQTT code coverage"
2020-01-07 11:37:43 -08:00
leegeth
b9c12bf4ae Coverity annotations for False positive warnings (#697)
* Coverity annotations for False poisitives

* Coverity annotations

* Add coverity to lexicon

* spell fix in a comment

* Fix comments

* fixing review comments

* reword comments

* improve comments

* Review comments fix
2019-12-30 16:05:13 -05:00
Muneeb Ahmed
3e1db2af8b Refactor _serializeConnect for complexity (#694) 2019-12-20 14:32:53 -08:00
Muneeb Ahmed
8a2102e68a Reduce complexity for _deserializeIncomingPacket (#696) 2019-12-20 14:15:52 -08:00
Gordon Wang
5034122c04 Refactor subscription topic parsing (#689) 2019-12-17 16:06:54 -08:00
abhidixi11
931b47dbd0 fix: MQTT serializer unit tests. (#688) 2019-12-17 13:38:36 -08:00
Gordon Wang
5b137613ac Refactor to reduce complexity (#687)
* Refactor _IotMqtt_DeserializeSuback

* Refactor find operation

* Refactor QoS and string check

* Fix CBMC proof for new function name

* Refactor subscription list validation
2019-12-16 16:41:54 -08:00
Gordon Wang
0db93997a0 Remove EMPTY_ELSE_MARKER (#686) 2019-12-16 10:13:44 -08:00
leegeth
8e522532d8 Remove macros hiding the control flow (#681) 2019-12-12 17:06:41 -05:00
Gordon Wang
a9955e42b0 Expand CI build checks for multiple build configurations (#661) 2019-12-06 15:29:15 -08:00
abhidixi11
1b16cf347b fix: MQTT lib warnings when asserts are disabled. (#674) 2019-12-06 14:32:26 -08:00
Gary Wicker
33b893d289 Automated spell checking for repository; spelling fixes (#656)
Basic automated spell checking for the repository.
2019-11-25 16:41:51 -08:00
Gordon Wang
ca4616aede Update docs with enhanced auth link (#655) 2019-11-25 15:54:18 -08:00
abhidixi11
98382dbb15 Doxygen comment grammar fix. (#654)
* fix: grammar.
Added articles in doxygen comments.
2019-11-21 17:53:11 -08:00
dcgaws
56674edebc Add support for MQTT username/password and IANA protocol string. (#642)
The purpose of this change is to allow standard-based username/password device authentication to an MQTT broker (#641).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
2019-11-21 11:58:28 -08:00
abhidixi11
31cb149b93 Fixed articles. (#652) 2019-11-20 22:26:39 -08:00
leegeth
5fb4243249 Spell check fixes (#650) 2019-11-20 19:36:21 -05:00
abhidixi11
7892618949 Fix Spellings and Typos (#647) 2019-11-19 17:43:18 -08:00
Ravishankar Bhagavandas
b36e272a1e Use previous subscriptions list for unsolicited messages (#644)
* Use previous subscriptions list for unsolicited messages

* Add doc on usage
2019-11-18 20:25:06 -08:00
abhidixi11
696ac4b32d Unit tests for Lightweight serializer API. (#643)
feature: Lightweight serializer API for MQTT.

MQTT serializer API changes to support lightweight single threaded app.

CSDK MQTT Library provides stateful MQTT API that makes use of taskpool
and network abstraction. The library makes use dynamic memory
allocations and makes use of multiple threads or tasks.
Embedded applications running on microcontroller may want to
use single threaded model to run MQTT.
The API changes enable application developers to use MQTT serializer
and deserializer APIs without use of taskpool and network abstraction.
The API does no allocate any dynamic memory, therefore application can
make use of statically allocated memory. Application can implement its
own state machine and make use of any network interface like sockets
to handle MQTT messages.
2019-11-14 18:13:43 -08:00
abhidixi11
9fc0c94bee feature: Lightweight serializer API for MQTT. (#626)
* feature: Lightweight serializer API for MQTT.

MQTT serializer API changes to support lightweight single threaded app.

CSDK MQTT Library provides stateful MQTT API that makes use of taskpool
and network abstraction. The library makes use dynamic memory
allocations and makes use of multiple threads or tasks.
Embedded applications running on microcontroller may want to
use single threaded model to run MQTT.
The API changes enable application developers to use MQTT serializer
and deserializer APIs without use of taskpool and network abstraction.
The API does no allocate any dynamic memory, therefore application can
make use of statically allocated memory. Application can implement its
own state machine and make use of any network interface like sockets
to handle MQTT messages.
2019-11-13 21:51:35 -08:00
Dan Griffin
d2fd9ecc1d Revert "Add support for MQTT username/password and IANA protocol string."
This reverts commit 19af44300483454dc5afa958d9847c8b18f7da8f.
2019-11-13 20:28:27 -08:00
Dan Griffin
10dafe8205 Add support for MQTT username/password and IANA protocol string. 2019-11-13 20:25:03 -08:00
Dan Griffin
c5f50c1077 Revert "Add support for MQTT username/password and IANA protocol string."
This reverts commit e3c332517328a320be952cc560440b58148e171b.
2019-11-13 20:17:06 -08:00
Dan Griffin
1fe1d7762c Add support for MQTT username/password and IANA protocol string. 2019-11-13 20:14:36 -08:00
Gordon Wang
b788232955 Remove void* network pointers (#622) 2019-10-31 13:51:02 -07:00
Sarena Meas
19858bdd30 Update MQTT System tests for connection retries (#620)
* Update MQTT system tests for connection retry.
- In Amazon FreeRTOS the number of retries is set to 3.
- In the CSDK the number of retries is the default of 1,
  since there are no failures in these tests' connections.
- Update doxygen for new test config IOT_TEST_MQTT_CONNECT_RETRY_COUNT
2019-10-30 14:08:14 -07:00
Gordon Wang
0fc51510e5 Move socket metrics to single file (#618) 2019-10-30 10:29:38 -07:00
Gary Wicker
5be9d7220a Guard against multiple calls to IotMqtt_Init/IotMqtt_Cleanup (#613) 2019-10-24 15:30:01 -07:00
Gary Wicker
ffa33eadfe Simplify IotMqtt_Connect(); fix max client ID length check. (#610) 2019-10-23 11:52:19 -07:00
Gary Wicker
01937cbbed Use #defines for max client ID & "remove all subscriptions" constants (#608)
Use #defines for max client ID & "remove all subscriptions" constants.
2019-10-19 08:55:54 -07:00
Gary Wicker
87d9e7bbc3 Revert signature change to IotNetworkInterface_t::create, doc updates (#607) 2019-10-18 11:01:55 -07:00
leegeth
05366638f9 Remove the assert for system taskpool check (#606) 2019-10-18 10:57:47 -07:00
Gordon Wang
324d013f19 Minor formatting fixes (#605) 2019-10-18 10:51:10 -07:00
Gary Wicker
07fd164f59 Documentation cleanup/improved signature for IotNetworkInterface_t::create (#603)
* Address remaining comments from PR#594, run uncrustify

* Documentation cleanup
2019-10-16 08:04:12 -07:00
Gary Wicker
e2034eee48 Address remaining comments from PR#594, run uncrustify (#602) 2019-10-15 08:59:46 -07:00
Gary Wicker
5819c6f438 Refactor serializer override logic
* Added types for the IotMqttSerializer_t functions
* Added internal utility macro to simplify serializer function override logic
2019-10-11 13:46:08 -07:00
Gordon Wang
cc126d96ef Add build check script (#592) 2019-10-10 10:02:04 -07:00
Gordon Wang
d9aaaec4c4 Rearrange directories (#589) 2019-10-07 15:55:03 -07:00