Commit Graph

1783 Commits

Author SHA1 Message Date
Andrey Starodubtsev ed2a680b9a Prevent calling `SSL_read` with `num == 0`
If whole packet was read from socket buffer, then `*actual_len ==
bytes`. But this means that `SSL_read` will be called with `num == 0`;
in this case `ssl3_read_bytes` from OpenSSL, for example, return 0 and
MQTT library treats connection as closed by remote peer.

Signed-off-by: Andrey Starodubtsev <andrey.starodubtsev@gmail.com>
2021-11-11 00:17:38 +03:00
Ian Craggs 2e57b65ca0 Add handling for incoming MQTT V5 disconnect #1163 2021-11-09 12:47:02 +00:00
Ian Craggs baa58602c7 Allow waitfor timeout parameter to be negative #1170 2021-11-08 09:53:06 +00:00
Ian Craggs c8944bbe8e Change -lpthread to -pthread #1160 2021-10-18 14:26:45 +01:00
Ian Craggs 511e0f6589 Correct .PHONY targets in Makefile #1159 2021-10-18 14:17:54 +01:00
Ian Craggs 3ae3d6a9ab Update to MQTTAsync_subscribe sample #1104 2021-10-11 17:41:38 +01:00
Yurii Nakonechnyi 9db81de275 Updated README.md - added description for CMake option PAHO_ENABLE_TESTING
Signed-off-by: Yurii Nakonechnyi <inobelar@gmail.com>
2021-10-04 15:16:59 +01:00
Ian Craggs 879832f2bd
Merge pull request #1081 from gambels/WIP_add_generic_proxy_support
Add generic proxy support
2021-10-04 15:14:06 +01:00
Vince Chan 354cec7dbb Fix spelling error in environment variable for osx job 2021-10-04 15:09:30 +01:00
Ian Craggs 26de689a3c Revert to macos-latest 2021-09-30 17:56:16 +01:00
Ian Craggs ea026c43d2 Switch to MacOS 11 for Github actions 2021-09-30 17:05:36 +01:00
Ian Craggs 286d65abd6
Merge pull request #1124 from roscaviktor/async-terminate-crash
Fix MQTTAsync_terminate() to re-check the number of handles after re-acquisition of mqttasync_mutex
2021-09-30 16:39:45 +01:00
Sven Gambel 83211070d6 Credit author of the original implementation
Signed-off-by: Sven Gambel <sven.gambel@gmx.net>
2021-09-19 16:40:26 +02:00
Sven Gambel 9396d4e4e1 Update Proxy.c
Fix Visual Studio 2013 build

Signed-off-by: Sven Gambel <sven.gambel@gmx.net>
2021-09-19 15:59:13 +02:00
Ian Craggs d1744cca8e Shorten message size for test8/test8 2021-09-13 15:22:03 +01:00
Ian Craggs 490873f229 Test8 debug 2021-09-13 14:57:13 +01:00
Ian Craggs 3d62381aad Better test debug 2021-09-13 14:22:25 +01:00
Ian Craggs 8f649286eb Debug test 2021-09-13 13:45:35 +01:00
Ian Craggs c0df8e7c22 Add test for blocked acks 2021-09-13 12:39:20 +01:00
Ian Craggs 8bef5197b5 Merge branch 'vm-vloz-dev2' of https://github.com/vm-vloz/paho.mqtt.c into vm-vloz-vm-vloz-dev2 2021-09-11 00:25:17 +01:00
Ian Craggs 8038d446f3 Correct MacOS OpenSSL location 2021-09-09 12:23:39 +01:00
Ian Craggs c26338da7a Add MacOS builds 2021-09-09 12:14:28 +01:00
ajit bansal 424215f4bd Issue:With MQTTCLIENT_PERSISTENCE_DEFAULT the paho code crashes for MQTTVERSION_5 #1108
For MQTTVERSION_5 for SUBSCRIBE command qoss details was not added in persistent folder.
Also at time of retrieving for SUBSCRIBE & UNSUBSCRIBE command ptr value was not update properly for MQTTProperties value in the buffer.
Because of which MQTTProperties_read() would not return 1 and qcommand ends being free and later down the call stack crash would happen.

This fix covers above two issue.
2021-08-12 16:26:28 +05:30
Ian Craggs 08d7757dea Set directory for build packaging 2021-08-09 11:42:15 +01:00
Ian Craggs 0245be75ab Run on ubuntu 18.04 instead 2021-08-09 11:09:51 +01:00
vm-vloz 97008357a0
Merge branch 'develop' into vm-vloz-dev2 2021-08-06 12:31:48 -07:00
Ian Craggs a72ea3ae48 Run tests from the right place 2021-08-05 19:03:06 +01:00
Ian Craggs 469c278ab7 Use sudo to install doxygen 2021-08-05 18:57:53 +01:00
Ian Craggs 378f64d582 Fix yaml 2021-08-05 18:47:45 +01:00
Ian Craggs eccdb84122 Try building with Github actions 2021-08-05 18:39:41 +01:00
Ian Craggs 31c44e79f3 Change ordering of acks to after processing incoming message 2021-07-28 17:38:35 +01:00
vm-vloz fadf34d1e5 Fix disconnect when there are pending writes
Signed-off-by: vm-vloz <73361520+vm-vloz@users.noreply.github.com>
2021-07-26 18:51:32 -07:00
Victor Rosca ee364a61a0 Fix MQTTAsync_terminate(), to re-check the number of handles after re-acquisition of mqttasync_mutex, and refrain from deleting the global variables if the number of handles is no longer zero.
Signed-off-by: Victor Rosca <rosca.viktor@gmail.com>
2021-07-08 07:57:58 +03:00
Ian Craggs de1bc380f5 Change version to 1.3.9 2021-05-24 17:32:09 +01:00
Ian Craggs ccb72a27f0 Reset ping_due on close session #1027 2021-05-06 13:38:47 +01:00
Ian Craggs ef9b4c7cc6 LOG_ERROR trace level and trace default for HIGH_PERFORMANCE #1026 2021-05-04 17:38:43 +01:00
Ian Craggs da998eab07 Don't allow duplicate connect/disconnect commands #1082 2021-05-04 17:37:10 +01:00
Ian Craggs a2891d8367 Add some PAHO_HIGH_PERFORMANCE builds 2021-05-03 18:41:58 +01:00
Ian Craggs 9801999821 MinGW32 build warnings fixes - #984 2021-05-03 14:38:50 +01:00
Stanislav Ravas 083f756d71 Generate shlibs control file for debian package
Without the control file, dpkg-shlibdeps won't recognize this package.
Depending packages created by library user would end up without
dependency on libpaho-mqtt.

Signed-off-by: Stanislav Ravas <ravas@tind.sk>
2021-05-03 14:14:14 +01:00
Roman Ondráček b64db5d82e Fix CMake targets install path
Signed-off-by: Roman Ondráček <ondracek.roman@centrum.cz>
2021-05-03 14:12:17 +01:00
Ian Craggs e6b34b7b5b Return code on Windows #1054 2021-05-03 11:26:11 +01:00
Ian Craggs 97da169b53 Warning message for situation described in #1007 2021-05-03 11:20:46 +01:00
Ian Craggs 765fc82576 Fix a use before free 2021-04-30 19:01:11 +01:00
Ian Craggs dfc646c551 Merge branch 'develop' of github.com:eclipse/paho.mqtt.c into develop 2021-04-30 17:14:25 +01:00
Ian Craggs 82cfe4c06e Cater for when ping can't be sent due to TCP buffer full #1027 2021-04-30 17:12:41 +01:00
Ian Craggs 5fb438e96b Handle delayed websocket upgrade #1061 #1047 2021-04-28 21:29:36 +01:00
Ian Craggs 7e96652613 Set Windows return code correctly from Thread_create_sem #1064 2021-04-28 16:18:11 +01:00
Ian Craggs b2b9307b13 Some fields shouldn't be static #1085 2021-04-28 15:41:13 +01:00
Sander van Harmelen b27bbd6fc7 Make sure to initialize the mask on the Publish struct
After a lot of debugging we found this to be the root cause of the
corruption reported in #1079

When not initializing the mask properly, the
[check](https://github.com/eclipse/paho.mqtt.c/blob/master/src/WebSocket.c#L274)
to see if a mask already exists might fail (depending on the existing
data in that part of the memory) which then means that whatever is in
the mask will be used for masking the data.

Fixes #1079

Signed-off-by: Sander van Harmelen <sander@vanharmelen.nl>
2021-04-28 14:52:07 +01:00