Roger A. Light
a3258f7d82
Packet cleanup without locks
...
Prevents use of invalid mutexes during mosquitto_destroy.
Closes #1914 . Thanks to Nikolay Raspopov.
2020-11-27 15:36:34 +00:00
Roger A. Light
584cf51ba7
Update to EPL-2.0
2020-11-25 17:34:21 +00:00
Roger A. Light
2755fe3c4c
Apply limits to QoS 0 outgoing messages.
2020-11-24 12:04:07 +00:00
Roger A. Light
4f61f6c161
Fix conversion errors.
2020-10-17 01:23:08 +01:00
Roger A. Light
6104172bcf
Fix connect properties not being sent.
...
This was happening when the client automatically reconnected.
Closes #1846 . Thanks to DSOFreak.
2020-10-14 11:21:41 +01:00
Roger A. Light
2774515456
Fix missing mach/mach_time.h header on OS X.
...
Closes #1831 . Thanks to P-Hagen.
2020-09-22 15:08:48 +01:00
Roger A. Light
acf4ff3738
Fix stdin being closed by mistake
...
This was closing the sockpair* sockets before they were initialised to INVALID_SOCKET.
Close #1823 . Thanks to ostkamp.
2020-09-14 19:35:22 +01:00
Roger A. Light
a53712a14d
Don't use logging until log mutex is initialised.
...
Closes #1819 . Thanks to santoshks68.
2020-09-11 17:02:15 +01:00
Roger A. Light
d9003bb858
Don't use mutex until it is initialised.
...
Coverity Scan 1430456.
2020-07-15 12:12:51 +01:00
Martin Kelly
61a50c60d2
add a refcount to library init/cleanup
...
Add a refcount around mosquitto_lib_init and mosquitto_lib_cleanup so
that multiple calls to init/cleanup don't trigger memory leaks or
double-frees.
Signed-off-by: Martin Kelly <mkelly@xevo.com>
2020-05-20 10:57:40 +01:00
Roger A. Light
346f695937
Separate out delay code from previous commit.
...
Plus add missing header.
2020-03-12 13:53:44 +00:00
Roger A. Light
5cf94d2e57
Merge branch 'fixes' of git://github.com/ChristianS99/mosquitto into fixes
2020-03-12 13:52:00 +00:00
Roger A. Light
b0a065f790
Update changelog. Release page. Bump copyright.
2020-02-27 23:26:58 +00:00
Roger A. Light
05ec02b3f3
Remove dead values.
2020-01-23 10:55:49 +00:00
Christian Schneider
a3ebeff9d7
fix: replace sleep with (p)select in loop_forever
...
sleep was blocking loop_stop(force=false) since it
was uniteruptible
Signed-off-by: Christian Schneider <cschneider@radiodata.biz>
2019-12-18 18:01:50 +01:00
Roger A. Light
494d3d29a0
Fix missing function warnings on NetBSD.
...
Thanks to Greg Troxel.
2019-08-04 23:00:26 +01:00
Daniel d'Andrada
0970451762
pthread_cancel() is not available on Android
...
Thus mosquitto_loop_start() and mosquitto_loop_stop()
won't be available there (and mosquitto_connect_async()
as a consequence).
Signed-off-by: Daniel d'Andrada <daniel.dandrada@esrlabs.com>
2019-06-06 15:04:14 +02:00
Roger A. Light
8531cb1d79
Separate broker message queues into in/out.
...
This allows and includes better flow control handling for QoS>0.
2019-04-17 09:29:34 +01:00
Roger A. Light
baf1909ffb
Improve some messages when client disconnects.
2019-04-16 11:40:07 +01:00
John Hickey
c011be62a4
Bridge TLS Application-Layer Protocol Negotiation
...
In order to connect to brokers that support both websockets and
mqtt on the same port (such as Amazon IoT), we need to set an
application for the SSL context. This change allows the specification
of an application by using the `bridge_alpn` configuration token.
Signed-off-by: John Hickey <jjh-github@daedalian.us>
2019-04-04 17:27:52 -07:00
Roger A. Light
ea046c2405
Merge branch 'master' of git://github.com/LarsVoelker/mosquitto into LarsVoelker-master
2019-03-26 18:36:13 +00:00
Roger A. Light
320ddc1303
Merge branch 'master'
...
Conflicts:
CMakeLists.txt
ChangeLog.txt
client/Makefile
config.mk
installer/mosquitto.nsi
installer/mosquitto64.nsi
lib/mosquitto.h
lib/mqtt3_protocol.h
lib/util_mosq.c
set-version.sh
snap/snapcraft.yaml
src/bridge.c
src/database.c
src/handle_connack.c
src/loop.c
src/persist.c
test/broker/Makefile
2019-03-16 10:05:38 +00:00
Roger A. Light
ce31269e05
Update changelog, bump version, bump copyright year.
2019-02-28 16:56:15 +00:00
Roger A. Light
f4e24f9524
Use higher resolution timer for random client id generation.
2019-02-26 14:26:05 +00:00
Roger A. Light
8fb4ad48b5
Strings for new error codes.
2019-02-19 15:53:15 +00:00
Roger A. Light
326292681a
Add maximum-qos support to broker and client.
...
This comes in the form of:
* Per listener maximum_qos option, which can be in the range 0-2.
* Changes to mosquitto_publish*() to return MOSQ_ERR_QOS_NOT_SUPPORTED
if attempting to publish with a higher QoS than supported.
* Bridges will downgrade messages to match the maximum QoS.
More tests on the broker side (specifically bridges) are required. This
needs bridge support for MQTT 5 first.
2019-01-09 18:03:01 +00:00
Roger Light
84660e1cbe
Send maximum limits for QoS>0.
...
This needs more work on the broker front to simplify the design.
2019-01-08 18:38:47 +00:00
Roger Light
67c1d4453e
Receive maximum support for clients.
2019-01-08 14:24:41 +00:00
Roger A. Light
fda66e8311
Add broker test for assigned client id.
2018-12-05 20:26:43 +00:00
Roger A. Light
54db895cb3
Rename clean_session to clean_start for v5.
2018-11-27 10:02:10 +00:00
Roger A. Light
f9e0fa246a
Validate properties coming into client library.
2018-11-01 18:53:06 +00:00
Roger A. Light
c19b3598c0
Add mosquitto_string_to_command.
2018-10-30 11:40:06 +00:00
Roger A. Light
636e813d1c
Load of constant renames ahead of making mqtt_protocol.h public.
2018-10-30 11:11:31 +00:00
Roger A. Light
05b40b90db
Add reason strings.
2018-10-04 12:43:43 +01:00
Roger A. Light
574fb36ede
More utf-8 validation.
2018-04-13 17:42:16 +01:00
Roger A. Light
6a2172f472
Windows fixes.
2018-04-12 11:09:02 +01:00
Roger A. Light
c95f24c342
Missing includes.
2018-04-11 21:30:02 +01:00
Roger A. Light
8470ca89b9
Add MOSQ_OPT_SSL_CTX and MOSQ_OPT_SSL_CTX_WITH_DEFAULTS options.
...
Closes #567 and #715 .
2018-04-11 16:34:24 +01:00
Roger A. Light
28dd14fcea
Separate out functions from mosquitto.c to aid discoverability.
2018-04-11 15:04:17 +01:00
Roger A. Light
86ced4d98f
Add mosquitto_connect_with_flags_callback_set().
...
This allows a second connect callback to be used that exposes the
MQTT connect flags parameter.
Closes #738 , #128 .
2018-04-11 14:06:16 +01:00
Roger A. Light
40e6a75709
Use c99 as compiling standard.
...
Closes : #765 .
2018-04-06 00:33:22 +01:00
Roger A. Light
81cb7ab547
Merge branch 'fixes' into develop
2018-02-13 14:16:47 +00:00
Pierre Fersing
254f30cdb1
Fix mosquitto_want_write for TLS sock connecting
...
Copied logic from mosquitto_loop which was already patched by
39ffd6fa
.
Bugs: #648
2018-01-05 15:39:11 +01:00
Roger A. Light
5a267368d7
Merge branch 'master' into develop
2017-07-19 00:15:42 +01:00
Zard1096
5b73897f98
Fix iOS crash issues
...
Relate to issues #327 and #63 .
mosq->sock may be closed before FD_SET(mosq->sock, &writefds) and
FD_ISSET(mosq->sock, &writefds) but after judgement in line 947
if(mosq->sock != INVALID_SOCKET). FD_SET(-1, ...) and FD_ISSET(-1, ...)
would certainly crash.
Signed-off-by: Zard1096 <mr.zardqi@gmail.com>
2017-07-16 23:22:13 +01:00
Roger A. Light
e74203de2c
Merge branch 'master' into develop
2017-07-16 22:52:01 +01:00
Dr. Lars Voelker
74adb43cc1
Adding OCSP Stapling support to mosquitto
...
Adding OCSP Stapling support to mosquitto, so that the TLS client side
requests the certificate status and checks it.
This code uses the OpenSSL-based OCSP implementation and is somewhat
based on the libcurl code for OCSP stapling.
Signed-off-by: Dr. Lars Voelker <lars.voelker@bmw.de>
2017-07-07 13:05:17 +02:00
Roger A. Light
6e7d02ba16
Fix for CVE-2017-9868 for Windows.
2017-06-26 14:53:33 +01:00
Roger A. Light
91b308a11d
Merge branch 'master' into develop
2017-03-06 21:19:53 +00:00
Roger A. Light
8e4a80a928
[329] Fix potential negative timeout being passed to pselect.
...
Thanks to Dollars.
Bug: https://github.com/eclipse/mosquitto/issues/329
2017-02-20 23:48:30 +00:00