Commit Graph

107 Commits (04c110183c5a4abd1eaa9e60b2d1898976e8bb9b)

Author SHA1 Message Date
Roger A. Light 04c110183c Bridge support for MQTT v5 maximum-qos. 5 years ago
Roger A. Light e030ca45cd Fix connack error printing. 5 years ago
Roger A. Light a3258f7d82 Packet cleanup without locks
Prevents use of invalid mutexes during mosquitto_destroy.

Closes #1914. Thanks to Nikolay Raspopov.
5 years ago
Roger A. Light 584cf51ba7 Update to EPL-2.0 5 years ago
Roger A. Light 2755fe3c4c Apply limits to QoS 0 outgoing messages. 5 years ago
Roger A. Light 4f61f6c161 Fix conversion errors. 5 years ago
Roger A. Light 6104172bcf Fix connect properties not being sent.
This was happening when the client automatically reconnected.

Closes #1846. Thanks to DSOFreak.
5 years ago
Roger A. Light 2774515456 Fix missing mach/mach_time.h header on OS X.
Closes #1831. Thanks to P-Hagen.
5 years ago
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.
5 years ago
Roger A. Light a53712a14d Don't use logging until log mutex is initialised.
Closes #1819. Thanks to santoshks68.
5 years ago
Roger A. Light d9003bb858 Don't use mutex until it is initialised.
Coverity Scan 1430456.
5 years ago
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>
5 years ago
Roger A. Light 346f695937 Separate out delay code from previous commit.
Plus add missing header.
6 years ago
Roger A. Light 5cf94d2e57 Merge branch 'fixes' of git://github.com/ChristianS99/mosquitto into fixes 6 years ago
Roger A. Light b0a065f790 Update changelog. Release page. Bump copyright. 6 years ago
Roger A. Light 05ec02b3f3 Remove dead values. 6 years ago
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>
6 years ago
Roger A. Light 494d3d29a0 Fix missing function warnings on NetBSD.
Thanks to Greg Troxel.
6 years ago
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>
6 years ago
Roger A. Light 8531cb1d79 Separate broker message queues into in/out.
This allows and includes better flow control handling for QoS>0.
7 years ago
Roger A. Light baf1909ffb Improve some messages when client disconnects. 7 years ago
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>
7 years ago
Roger A. Light ea046c2405 Merge branch 'master' of git://github.com/LarsVoelker/mosquitto into LarsVoelker-master 7 years ago
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
7 years ago
Roger A. Light ce31269e05 Update changelog, bump version, bump copyright year. 7 years ago
Roger A. Light f4e24f9524 Use higher resolution timer for random client id generation. 7 years ago
Roger A. Light 8fb4ad48b5 Strings for new error codes. 7 years ago
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.
7 years ago
Roger Light 84660e1cbe Send maximum limits for QoS>0.
This needs more work on the broker front to simplify the design.
7 years ago
Roger Light 67c1d4453e Receive maximum support for clients. 7 years ago
Roger A. Light fda66e8311 Add broker test for assigned client id. 7 years ago
Roger A. Light 54db895cb3 Rename clean_session to clean_start for v5. 7 years ago
Roger A. Light f9e0fa246a Validate properties coming into client library. 7 years ago
Roger A. Light c19b3598c0 Add mosquitto_string_to_command. 7 years ago
Roger A. Light 636e813d1c Load of constant renames ahead of making mqtt_protocol.h public. 7 years ago
Roger A. Light 05b40b90db Add reason strings. 7 years ago
Roger A. Light 574fb36ede More utf-8 validation. 8 years ago
Roger A. Light 6a2172f472 Windows fixes. 8 years ago
Roger A. Light c95f24c342 Missing includes. 8 years ago
Roger A. Light 8470ca89b9 Add MOSQ_OPT_SSL_CTX and MOSQ_OPT_SSL_CTX_WITH_DEFAULTS options.
Closes #567 and #715.
8 years ago
Roger A. Light 28dd14fcea Separate out functions from mosquitto.c to aid discoverability. 8 years ago
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.
8 years ago
Roger A. Light 40e6a75709 Use c99 as compiling standard.
Closes: #765.
8 years ago
Roger A. Light 81cb7ab547 Merge branch 'fixes' into develop 8 years ago
Pierre Fersing 254f30cdb1 Fix mosquitto_want_write for TLS sock connecting
Copied logic from mosquitto_loop which was already patched by
39ffd6fa.

Bugs: #648
8 years ago
Roger A. Light 5a267368d7 Merge branch 'master' into develop 8 years ago
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>
8 years ago
Roger A. Light e74203de2c Merge branch 'master' into develop 8 years ago
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>
8 years ago
Roger A. Light 6e7d02ba16 Fix for CVE-2017-9868 for Windows. 8 years ago