Commit Graph

61 Commits

Author SHA1 Message Date
Ian Craggs 02db68bf76
Use macros instead of constants to eliminate compile warnings 2026-02-07 21:56:17 +00:00
Ian Craggs 02d060fa59
Merge branch 'remove-unnecessary-win64' of github.com:fpagliughi/paho.mqtt.c into fpagliughi-remove-unnecessary-win64 2025-08-14 16:05:28 +01:00
Ian Craggs bba7246972
Ensure argument for isprint and isxdigit is in the correct range #1565 2025-02-17 18:51:13 +00:00
fpagliughi 1bb2e691e1 - Removed unnecessary _WIN64 conditional checks
- Fixed some conditional compilation using (WIN32) to (_WIN32)
2025-01-09 16:09:38 -05:00
Ian Craggs 33e195aca6 Allow buffer initialization to work on windows 2024-12-30 19:36:25 +00:00
Ian Craggs 4688f42c59 Print unprintable trace data in hex #1414 2024-12-30 19:15:31 +00:00
Ian Craggs 67e3eb6062 Revert "fix: MQTTPacket.c read&write Int/Int4 error" #1336
This reverts commit ed07139291.
2023-10-09 14:11:58 +01:00
Ian Craggs 3933f8b796 Change writeInt4 and readInt4 signatures to unsigned #1336 2023-04-27 18:33:02 +01:00
lijinggang ed07139291 fix: MQTTPacket.c read&write Int/Int4 error
readInt
writeInt
readInt4
writeInt4

eg:
writeInt4(0xFFFFFFFF)

Signed-off-by: lijinggang <lijinggang@aliyun.com>
2023-04-27 17:05:54 +01:00
Ian Craggs 0465673753 Ping processing when sockets being used by large messages 2022-07-02 13:22:23 +01:00
Ian Craggs 2e57b65ca0 Add handling for incoming MQTT V5 disconnect #1163 2021-11-09 12:47:02 +00:00
Ian Craggs a7f0e9a364 Check for msgid data length in incoming packets #1084 2021-03-22 17:57:07 +00:00
Ian Craggs f06f87868b Propagate data errors reading MQTT properties #986 #985 2020-10-27 12:49:59 +00:00
Ian Craggs c5f745fc3c Add callbacks before writes and after reads from persistence #866 2020-09-28 20:21:10 +01:00
Ian Craggs 9ab83100a8 Gather packet buffer data into a structure and record websocket mask used 2020-07-23 16:05:34 +01:00
kcieslinski e07efe3e6e Ensure proper re-collecting MQTT frame from WS frame.
This fix ensure proper collecting MQTT frame from WS frame when previous attempt was interrupted at position > 0.

Signed-off-by: kcieslinski <krzysztof.cieslinski@rst.com.pl>
2020-06-19 08:41:27 +02:00
Ian Craggs 1e91229cb6 Update license from EPL v1 to v2 2020-04-06 13:27:50 +01:00
Ian Craggs 60350cae9d Linux build for #758 2020-03-26 15:21:09 +00:00
Ian Craggs 39ef1075e2 Cope with system time changes #758 2020-03-26 14:54:11 +00:00
Ian Craggs 47ef5b84e6 Some malloc checks #552 2020-03-18 20:44:04 +00:00
Ian Craggs adf8ec35b4 Fix make compile warnings 2020-03-02 18:07:44 +00:00
Ian Craggs d0eed3767f Fix Websocket packet building #815 2020-02-24 16:51:44 +00:00
Ian Craggs 6ddd32095b Add payload length to publish trace messages 2020-02-10 11:44:23 +00:00
Ian Craggs ac3ae38069 Correct persisting of pubrel received publish messages in MQTT V5 2019-11-26 14:20:17 +00:00
Ian Craggs 282b54c3a9 Correct property integer types to unsigned #559 2019-07-23 12:22:06 +01:00
Ian Craggs c223d91a04 Error handling when properties not read properly #563 2019-07-22 22:13:25 +01:00
Ian Craggs 08a153e0e8 Fix for issue #661 not sending MQTT V5 disconnect packet if no properties and reasoncode=0 2019-05-29 16:31:27 +01:00
Ian Craggs 296fe57cd2 MQTT V5 persistence updates #534 2018-09-05 22:13:40 +01:00
Ian Craggs 992af7ac02 Update documentation #503 2018-08-01 20:01:12 +01:00
Ian Craggs ede005c41d Async client specific test for client topic aliases 2018-06-08 19:35:03 +01:00
Ian Craggs 7ea1333911 MQTTClient v5 specific tests. Receive disconnect #469. Client topic aliases #472 2018-06-07 14:45:01 +01:00
Ian Craggs fcef9b5dd5 Merge branch 'develop' into mqttv5 2018-06-04 15:38:02 +01:00
Ian Craggs c897ebacbb Merge branch 'develop' of https://github.com/lt-holman/paho.mqtt.c into lt-holman-develop 2018-05-24 12:22:12 +01:00
Ian Craggs 1b61a3bf1f Merge branch 'develop' into mqttv5 - get latest fixes 2018-05-16 10:28:31 -07:00
Ian Craggs 89f227ce68 Fix for issue #453 2018-05-15 10:11:31 -07:00
Keith Holman 73cc3ea9c8 websocket: fixes to work with paho test suite
This patch contains some fixes to work with the paho test suite.

Signed-off-by: Keith Holman <keith.holman@windriver.com>
2018-05-02 17:01:21 -04:00
Keith Holman 086111f1dd WebSocket: initial websocket support + utilities
closes: #166

This patch provides an initial implementation for websocket support for
paho. For the websocket specification see RFC 6455.  The purpose of this
patch is to allow connnecting to an MQTT broker listening on a websocket
port (typically 80 [HTTP] or 443 [HTTPS]) to be able to communicate with
a client using the paho library.  Using websockets to communicate increases
the packet overhead both sending and receiving as well as additional setup
and ping packets.  However, using websockets allows for communications on
standard HTTP/HTTPS ports which are generally already configured by
firewalls to allow outside communications.

To use websockets, prefix the connection URI with either: "ws://" or
"wss://" for either websockets or secure websockets, repectfully.

Signed-off-by: Keith Holman <keith.holman@windriver.com>
2018-05-02 16:59:25 -04:00
Ian Craggs 167278c0a8 First pass at MQTTAsync - sending V5 packets and receiving responses 2018-04-27 22:26:23 +01:00
Ian Craggs 6983ad7f87 MQTTClient unsubscribe and disconnect 2018-04-18 18:24:06 +01:00
Ian Craggs 36ca298edd Merge branch 'develop' into mqttv5 2018-04-18 10:23:00 +01:00
Ian Craggs bc8a5cb700 Publish qos 1 and 2, unsubscribe 2018-04-17 22:47:10 +01:00
Ian Craggs 7cc0e3fa38 MQTT 5.0 publish qos 0 send and receive 2018-03-22 17:37:45 +00:00
Ian Craggs 6a1f39f7b7 MQTT 5.0 connect and connack #417 2018-03-08 18:52:07 +00:00
Juergen Kosel bde0406348 Remove unused function MQTTPacket_free_packet()
The function MQTTPacket_free_packet() is not used at all.
Eliminating dead code to improve readability.

Signed-off-by: Juergen Kosel <juergen.kosel@softing.com>
2017-11-30 10:15:26 +01:00
Ian Craggs e940c3c8ac Fix for issue #298 2017-07-11 12:58:20 +01:00
Ian Craggs f11f08e8b0 Binary passwords and will messages: PR #159, issues #167 and #34
Squashed commit of the following:

commit 907b9ecdaf160bf95c17aafcaf4ab3e656ab9ccc
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Wed Apr 5 23:33:44 2017 +0100

    Use binary passwords in tests

commit 3930b18d3835727e3cb98ef0ce1a742bd0dffab7
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Wed Apr 5 17:15:29 2017 +0100

    Binary MQTT password support

commit 4abe6a996b1219aafa22b5dd69bf1e676d377466
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Wed Apr 5 16:13:18 2017 +0100

    Fix test config

commit e742ed182d6de44e9afd6e9c9c03c79f359fbe29
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Wed Apr 5 15:46:53 2017 +0100

    Async binary will message

commit 9313e66214720c285f510e325a5c942ad22f2542
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Wed Apr 5 11:50:10 2017 +0100

    Binary will message support, take 2

commit 5cf548505a548eff394348aa7406e5a34d0f5054
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Tue Apr 4 22:54:15 2017 +0100

    Binary will message
2017-04-06 10:49:05 +01:00
Guilherme Maciel Ferreira 56fda22240 Make functions visible only within the module
This prevents linking problems.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2017-03-06 11:55:23 -06:00
Guilherme Maciel Ferreira f2f0390d01 Const-fy char pointers that point to .rodata strings
Using modifiable char pointers to access read-only strings may
lead to invalid memory access.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2017-03-06 11:55:23 -06:00
Guilherme Maciel Ferreira 009fd7bf6e Add missing function prototypes
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2017-03-06 11:55:19 -06:00
Ian Craggs 2912e2b93d Fix compile warnings in 64 bit builds & make debug builds work properly
Bug: 480160, 443722
2015-11-04 22:08:02 +00:00