Commit Graph

69 Commits (master)

Author SHA1 Message Date
Eric Blankenhorn ee52068ff7 Fix from review 2026-08-24 08:31:42 -05:00
Eric Blankenhorn abcd3f04a5 Fix from review 2026-08-20 15:36:21 -05:00
Eric Blankenhorn 31b55ebda7 Fixes from review 2026-07-16 16:05:33 -05:00
Eric Blankenhorn dbca08fffd Fixes from review 2026-07-16 10:17:50 -05:00
Eric Blankenhorn 4eeb554921 Add auto-ping feature to client 2026-07-15 16:52:55 -05:00
aidan garske 087d9f0130 F-5766 F-5767 F-5768 F-5769 F-5861 - Sanitize broker-controlled strings in example log output 2026-06-11 16:34:56 -07:00
Eric Blankenhorn 4f5c2d24df Fixes from review 2026-04-23 12:56:28 -05:00
Eric Blankenhorn c77cf02662 Fix f-3192 subscribe rejection error 2026-04-21 14:24:30 -05:00
Eric Blankenhorn d3b6389208 Release prep for v2.0.0 2026-03-19 16:22:27 -05:00
Eric Blankenhorn f7430a6d66 Update license to GPLv3 2025-12-01 15:24:44 -06:00
Eric Blankenhorn 91a9457784 v1.19.2 release prep 2025-01-31 09:48:15 -06:00
Eric Blankenhorn 639108eb2e v1.19.0 release 2024-03-22 13:17:36 -05:00
jordan a80d3076ca Fix double unlock and double lock in multithread example. 2024-03-06 16:57:08 -06:00
philljj 96858205ea Add stress test: cleanup, update readme. 2024-01-03 10:53:32 -06:00
philljj db154b86af Add stress test: allow configuring num threads and pubs. 2023-12-29 14:39:44 -06:00
philljj 2bb400b0e2 Add stress test. 2023-12-27 15:21:57 -06:00
Eric Blankenhorn e753456bd1 Med fixes 2023-12-19 15:49:20 -06:00
David Garske 8a0cafe48a Add packet_id to the publish log message in examples. 2023-11-27 13:33:15 -08:00
David Garske 033634773f Improve logic for detection of active read or write. Add test case for trying to send multiple publishes in the same thread. 2023-11-27 13:05:57 -08:00
David Garske 97cb820562 Fixes for using the `-f [file]` option with examples. Allow build-time override of `MAX_BUFFER_SIZE` in examples. 2023-11-22 13:27:29 -08:00
jordan eae8e4798c Cleanup executable status on src files. 2023-11-22 10:45:46 -06:00
David Garske 43779337ea Do not call disconnect callback for "continue". Allow unsubscribe after "exit" in multi-threaded example. 2023-11-21 15:08:25 -08:00
David Garske 26de3118ba Cleanups from refactor of locking. 2023-11-21 15:08:25 -08:00
David Garske 01db5ca100 Refactor of locking to better detect and handle edge cases. Allow partial writes on all packet types. 2023-11-21 15:08:25 -08:00
David Garske c9d41db3ab Improvements to multithread example and tests. 2023-11-21 15:08:25 -08:00
David Garske c973f0f966 * Added write WOLFMQTT_TEST_NONBLOCK support.
* Fix to make sure ctrl+c is honored during a want read/write case.
* Fix the firmware update example to properly synchronize publish and use a unique topic name.
* Improve multi-thread test message to use larger size (> tx but) and in test mode check for actual message.
* Improve remote test done logic.
* Only run GitHub CI for PR's, not local push.
* Properly set `WOLFMQTT_NO_EXTERNAL_BROKER_TESTS` for each test.
* Use cat for logs, not more.
2023-10-27 11:19:47 -07:00
Lealem Amedie 7df1339d89 Adding alternate main drivers to examples 2023-05-26 11:44:00 -06:00
David Garske 8ce55d656f Add API to check if message is active (non-blocking only). 2023-04-14 08:39:50 -07:00
David Garske fb70f1e203 Fix the multi-threaded test to not complete when there is a partially read packet. 2023-04-13 16:59:11 -07:00
Eric Blankenhorn 984be4ffbb wolfMQTT Release v1.15.1 preparation 2023-03-14 07:55:37 -05:00
Eric Blankenhorn 4c80c921a8 Fix example msg cb print error 2022-05-04 16:21:41 -05:00
David Garske bee3d8d9d0 Improve the publish callback printing to clarify range received vs what is printed. 2022-03-24 08:27:02 -07:00
David Garske cc2eb7a128 Add test case for `MqttClient_Publish_WriteOnly` 2022-02-07 16:37:35 -08:00
Eric Blankenhorn 50ddbda73c Fix MQTTv5 disconnect with props 2022-02-04 10:36:02 -06:00
David Garske 3d7b4adace Improve debugging code to allow reproduction of the cancel bug. Build using `WOLFMQTT_TEST_CANCEL` and run `./examples/multithread/multithread -T -q 1`. 2022-02-01 15:29:33 -08:00
Eric Blankenhorn e24bd0edaa wolfMQTT Release v1.11.0 preparation 2022-01-07 15:20:59 -06:00
David Garske e29f50a1b6 Fix for ping keep-alive timeout tracking in multi-thread non-blocking example. 2022-01-05 11:12:15 -08:00
David Garske 7fd2757bc6 Fix for multithread in blocking mode with `-T` test used by `make check`. 2022-01-04 19:36:50 -08:00
David Garske dda1611f0d Added new API `MqttClient_CancelMessage` to cancel pending message. If an API returns `MQTT_CODE_CONTINUE` this allows canceling the pending message or locks it has. 2021-12-29 15:09:19 -08:00
David Garske ebd75b9b00 Fixes for multithreading with non-blocking:
* Add non-blocking support to multi-threaded example.
* Fixes for multi-threading with non-blocking. Message state needs to be tracked separately for read and write.
* Refactor of the ACK handling to release read lock during processing ACK.
* Fixed bug where the reset of the shared object was clearing state.
* Fix to only keep read locked if started reading packet.
* Fix to always build all examples (unless `--disable-examples` is set).
* Fix for `WOLFMQTT_USER_THREADING`.
ZD 12793
2021-12-29 15:09:19 -08:00
David Garske 4b8c8900ce Trim whitespace and convert tab to spaces. 2021-12-01 13:18:30 -08:00
Eric Blankenhorn 039e04359b Remove unused sub_id element, add support for local test broker 2021-11-19 11:33:13 -06:00
Eric Blankenhorn 0810a62e96 Fix multithread qos1 response 2021-09-13 09:55:18 -05:00
David Garske 5566fa04e5 Fixes for multi-threading:
* Fix for posix thread not waiting on conditional signal count zero.
* Fix for `MqttClient_WaitType` and `SN_Client_WaitType` resetting `mms_stat` after the read unlocked.
* Cleanup for newlines (handled in PRINTF).
2021-06-08 15:15:01 -07:00
David Garske 78370ed784 Fixes for three multi-thread issues:
1) The client lock is needed earlier to protect the "reset the packet state".
2) The subscribe ack was using an unprotected pointer to response code list. Now it makes a copy of those codes.
3) Add protection to multi-thread example "stop" variable.
Thanks to Fatimah Aljaafari (@fatimahkj) for the report.
ZD 12379 and PR #198
2021-06-02 15:35:50 -07:00
Eric Blankenhorn 4ed5ed287f wolfMQTT Release v1.8 preparation 2021-02-19 14:44:07 -06:00
Eric Blankenhorn e707ab5ded Fix for WIN thread create macro 2020-11-13 15:54:31 -06:00
Eric Blankenhorn 8b8588b88f Fix clang errors 2020-10-15 12:23:36 -05:00
Eric Blankenhorn 0d7dfe5a30 wolfMQTT Release v1.7 preparation 2020-08-21 13:47:11 -05:00
Daniel Pouzzner 6dc37ee380 fix a pair of observed MqttProp leaks in MqttClient_DecodePacket(), one for MQTT_PACKET_TYPE_CONNECT_ACK when null packet_obj, one for MQTT_PACKET_TYPE_PUBLISH when null packet_obj, and several other unobserved but possible leaks for the other cases when null packet_obj. this resolves the deadlock observed when NUM_PUB_TASKS was set to 10 in multithread.c.
raise NUM_PUB_TASKS in multithread.c back to 10.

add a mutex for MqttProps_Add() and MqttProps_Free(), and add MqttProps_Init() to init the mutex, now called from MqttClient_Init().  prop.type is now initialized to MQTT_PROP_TYPE_MAX by MqttProps_Add(), to avoid a race, and callers are not allowed to zero out a prop (they are, and were, returned by MqttProps_Add() already cleared).

API change: make MqttClient_PropsFree() return int, not void, so that mutex failure is reported to the caller.
2020-07-30 23:29:25 -05:00