Commit Graph

179 Commits

Author SHA1 Message Date
Roger A. Light
dc02e37af9 Bump version number. 2015-12-20 20:34:22 +00:00
Roger A. Light
7aa653c42f Add support for libwebsockets 1.6. 2015-12-19 01:21:17 +00:00
Roger A. Light
c5a376489e [483979] Fix "mosquitto_pub -l" stripping the final character on a line.
Thanks to Allan Kobelansky.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=483979
2015-12-18 22:29:32 +00:00
Roger A. Light
148df82144 [484693] Fix _mosquitto_socketpair() on Windows.
Thanks to Steve Woods and Roman Bogus.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=484693
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=479143
2015-12-18 22:09:36 +00:00
Roger A. Light
559e2438cb Revert "Add support for sending direct messages to clients."
This reverts commit 8f54cde293.
2015-11-18 12:27:23 +00:00
Roger A. Light
8f54cde293 Add support for sending direct messages to clients.
This works through $CLIENT/direct/<client id>, using the
allow_direct_messages option.
2015-11-13 21:01:56 +00:00
Roger A. Light
3cab5e2e69 Bump version number. 2015-11-08 21:25:04 +00:00
Roger A. Light
80300f8fa1 [468987] Free unused topic tree elements.
Fix in 1.4.3 was incomplete.

Thanks to Guido Hinderberger et al.
2015-11-08 20:23:07 +00:00
Roger A. Light
26eac3c1ca Fix possible memory leak with bridges and SSL.
Fix possible memory leak if bridge using SSL attempts to connect to a
host that is not up.

Thanks to Ed Morris.
2015-10-12 14:48:52 +01:00
Roger A. Light
89763a51d9 [478917] Don't truncate lines with "mosquitto_pub -l"
Thanks to Jan-Piet Mens.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=478917
2015-10-11 22:55:54 +01:00
Roger A. Light
8ecb9291ab Disable support for DNS SRV by default. 2015-09-22 15:28:28 +01:00
Roger A. Light
436d3fac19 Merge branch 'fixes' into develop
Conflicts:
	CMakeLists.txt
	ChangeLog.txt
	config.mk
	installer/mosquitto.nsi
	installer/mosquitto64.nsi
	lib/mosquitto.c
	lib/mosquitto.h
	src/loop.c
2015-09-22 14:18:12 +01:00
Roger A. Light
9a2eb2038f Drop Windows XP support, misc fixes on Windows. 2015-09-22 10:03:57 +01:00
Roger A. Light
720d52d86e Bump version number. 2015-09-16 22:53:28 +01:00
Roger A. Light
011de7ed19 Fix excessive calls to message retry check. 2015-09-16 22:14:26 +01:00
Roger A. Light
17e942e9b5 [475707] Fix free related crash on openwrt.
Thanks to Karl Palsson.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=475707
2015-09-16 21:20:40 +01:00
Roger A. Light
2597da17c2 [475807] Fix cross compiling of websockets.
Thanks to Tyler Brandon.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=475807
2015-09-16 21:13:03 +01:00
Roger A. Light
0c0961f6a4 [477571] Fix socket leak with bridges.
Don't leak sockets when an outgoing bridge connection with multiple
addresses is rejected.

Thanks to Johnny Egeland.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=477571
2015-09-16 17:39:00 +01:00
Roger Light
e2324ff9bb Merge remote-tracking branch 'remotes/origin/master' into develop
Conflicts:
	CMakeLists.txt
	ChangeLog.txt
	THANKS.txt
	appveyor.yml
	config.mk
	installer/mosquitto-cygwin.nsi
	installer/mosquitto.nsi
	lib/messages_mosq.c
	lib/messages_mosq.h
	lib/mosquitto.c
	lib/mosquitto.h
	lib/net_mosq.c
	lib/net_mosq.h
	lib/send_client_mosq.c
	lib/send_mosq.c
	lib/socks_mosq.c
	lib/will_mosq.c
	src/bridge.c
	src/conf.c
	src/context.c
	src/database.c
	src/loop.c
	src/mosquitto.c
	src/mosquitto_broker.h
	src/net.c
	src/read_handle.c
	src/read_handle_server.c
	src/subs.c
2015-09-09 22:02:46 +01:00
Roger A. Light
d71db835eb Bump version number. 2015-08-18 23:38:02 +01:00
Roger A. Light
201bb1a04a Fix potential crash on libwebsockets error. 2015-08-18 23:33:55 +01:00
Roger A. Light
2172ffb56c [470253] Fix potential memory leaks.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=470253
Also-by: Wun Yu <wuyun1984_1984@163.com>
2015-08-17 22:10:26 +01:00
Roger A. Light
ab7f212b7e [468987] Free unused topic elements.
Reduces memory usage and CPU usage.

Thanks to Guido Hinderberger, Martin Rauscher and Michael Hekel.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=468987
2015-08-17 21:25:30 +01:00
Roger A. Light
1254fe93e0 [474935] Increment inflight message count correctly.
Don't duplicate the increment when queueing.

Thanks to Joe McIlvain.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=474935
2015-08-17 20:50:41 +01:00
Roger A. Light
e49e398eb3 Fix handling of outgoing QoS>0 messages for bridges.
Fix handling of outgoing QoS>0 messages for bridges that could not be
sent because the bridge connection was down.
2015-08-17 20:50:41 +01:00
Roger A. Light
4c147309a4 Minimum supported libwebsockets version is now 1.3. 2015-07-08 09:07:48 +01:00
Roger A. Light
a4dad02064 [470246] Change sys tree print output on USR2.
Thanks to Yun Wu.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=470246
2015-06-29 21:24:16 +01:00
Roger A. Light
e0037b348f [465438] Fix incorrect behaviour for autosave_interval.
Thanks to Jaime Yu.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=465438
2015-06-29 17:11:16 +01:00
Roger A. Light
a330c5ca17 [471334] Fix incorrect loop timeout with keepalive=0.
Fix incorrect loop timeout being chosen when using the threaded
interface and keepalive = 0.

Thanks to Gianfranco Costamagna.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=471334
2015-06-29 15:57:16 +01:00
Roger A. Light
6f193de3a5 [470258] Don't make unnecessary copies of payload in db__messages_store.
Along with the previous commit this closes #470258.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=470258
2015-06-28 22:25:49 +01:00
Tomas Novotny
29731b5e46 [471053] Add systemd support and services.
Add possibility to notify systemd that service is fully started. Also add
reference service files.

Change-Id: Ib4e39c8406ab6c15e1b88f197ae8f91c3e402023
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=471053
Signed-off-by: Tomas Novotny <novotny@rehivetech.com>
2015-06-26 10:29:39 +02:00
Roger A. Light
dc5abcac95 [470660] Handle fragmented TLS packets without a delay.
Thanks to Martin Rauscher.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=470660
2015-06-25 10:53:24 +01:00
Roger A. Light
c1974e5402 Report error string on connection failure rather than error code. 2015-06-23 22:59:03 +01:00
Roger A. Light
7657aac584 [469467] Fixes and documentation to use_subject_as_username patch.
This is for certificate based client authentication.

Thanks to Fabian Ruff.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=469467
2015-06-12 22:52:15 +01:00
Roger A. Light
e469843ed9 Produce an error if two bridges share the same local_clientid. 2015-06-09 23:18:13 +01:00
Roger A. Light
cdbe62c2bb Outgoing messages with QoS>0 are no longer retried after a timeout.
This change in behaviour can be justified by considering when the
timeout may have occurred.

* If a connection is unreliable and has dropped, but without one end
  noticing, the messages will be retried on reconnection. Sending
  additional PUBLISH or PUBREL would not have changed anything.

* If a client is overloaded/unable to respond/has a slow connection then
  sending additional PUBLISH or PUBREL would not help the client catch
  up. Once the backlog has cleared the client will respond. If it is not
  able to catch up, sending additional duplicates would not help either.
2015-05-24 11:59:53 +01:00
Roger A. Light
290ea87828 Build fixes for OpenBSD. 2015-05-21 17:15:33 +01:00
Roger A. Light
a6827df6c0 [467096] Fix incorrect bridge notification.
If a custom notification topic was used, the bridge status would be set
to 1 before a connection was attempted, this has been fixed.

Initial updates to the status topic are now only set once, when the
broker starts, rather than each time the bridge attempts to reconnect.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=467096
2015-05-16 12:05:17 +01:00
Roger A. Light
28b649059c Release date. 2015-05-07 00:55:08 -05:00
Roger A. Light
6f2fe06f0b [464811] Fix handling of payload lengths>4096 with websockets.
Thanks to Arjen van Elteren and Stephen Zeng.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464811
2015-05-06 16:40:10 -05:00
Roger A. Light
121c2ca002 Broker will return CONNACK rc=5 when a client is not authorised.
This was being incorrectly set as rc=4.
2015-05-06 04:54:11 -05:00
Roger A. Light
8de6b92e3c Fix calls to mosquitto_connect*_async() not completing. 2015-04-29 10:13:55 +01:00
Roger A. Light
11d0d887f0 Fix parsing of auth_opt_ arguments with extra spaces/tabs. 2015-04-24 20:57:30 +01:00
Roger A. Light
cc7beb62a5 [465384] Fix crash on Windows when using bridges.
Thanks to Stefan Rosskopf.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=465384
2015-04-24 09:34:24 +01:00
Roger A. Light
e5010af4df [464632] Library: Fix possible crash due to select() call.
Fix possibility of select() being called with a socket that is >FD_SETSIZE.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464632
2015-04-19 21:13:54 +01:00
Roger A. Light
21b372ed9e ACLs are now checked before sending a will message. 2015-04-18 22:16:57 +01:00
Roger A. Light
2e05e40350 [464458] mosquitto_sub: Add option to print the payload in hex.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464458
2015-04-17 22:01:50 +01:00
Roger A. Light
991f1173d7 Fix persistent db writing on Windows.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464779
2015-04-17 21:51:24 +01:00
Roger A. Light
1bdd6c36a8 Fix incorrect bridge connection notifications on local broker. 2015-04-17 21:51:21 +01:00
Roger Light
322d9624a1 Fix CMake dependencies for libmosquittopp.
Enables parallel build mode.

Accepted without CLA after discussion with Eclipse Foundation legal
about very small patches that can only be implemented in one way.

See bug report for acceptance of Certificate of Origin.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463884
Also-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
2015-04-17 21:51:14 +01:00
Roger A. Light
1fb7465b83 [464437] Broker: Fix bridge prefixes operation.
Fix bridge prefixes only working for the first outgoing message.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464437
2015-04-11 11:43:21 +01:00
Roger A. Light
22fee31ba4 [464436] Library: Fix outgoing QoS 2 message problem.
Inflight message count wasn't being decreased for outgoing messages using
QoS 2, meaning that only up to 20 QoS 2 messages could be sent. This has
been fixed.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464436
2015-04-11 11:32:33 +01:00
Roger A. Light
9c9df00746 Bump version number. 2015-04-03 07:57:30 +01:00
Roger A. Light
46ccc2efe9 [463479] Make _mosquitto_mid_generate() thread safe.
Thanks to bdwalker.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463479
2015-04-03 07:48:55 +01:00
Roger A. Light
2ecee163ef Use uhpa for payloads. 2015-04-01 09:35:40 +01:00
Roger A. Light
960b3ef32d Fix possible minor memory leak on acl parsing. 2015-03-30 22:26:44 +01:00
Roger A. Light
3591f2d256 [462781] Allow longer paths on Windows.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=462781
2015-03-27 21:47:27 +00:00
Roger A. Light
c9a924e95e [462780] Fix crash on multiple calls to lib init/clean.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=462780
2015-03-27 21:02:49 +00:00
Roger A. Light
502c3e7563 [461619] Disconnect idle websockets clients.
Websockets clients are now periodically disconnected if they have not
maintained their keepalive timer.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=461619
2015-03-27 20:50:16 +00:00
Roger A. Light
0434d1cd9b [461705] Return -1 on error from mosquitto_socket()
Thanks to Mikkel Kirkgaard Nielsen.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=461705
2015-03-27 01:40:41 +00:00
Roger A. Light
2aceb704b5 [463000] Fix reconnect bug on Windows.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463000
2015-03-27 01:24:16 +00:00
Roger A. Light
35b729909c [463241] Fix possible crash under heavy network load.
Thanks to Alexandre Zia.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463241
2015-03-27 01:07:48 +00:00
Roger A. Light
c6450ac265 [462154] Fix problems parsing config strings with leading spaces.
Thanks to Aidan Gill.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=462154
2015-03-15 20:49:18 +00:00
Roger A. Light
e310092f44 [461620] Inflight limits should only apply to outgoing messages.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=461620
2015-03-08 22:06:20 +00:00
Roger A. Light
28404350c4 Fix possible crash when using pattern ACLs. 2015-03-08 21:00:15 +00:00
Roger A. Light
279b67bf8d Minor packaging related fixes. 2015-02-18 01:34:43 +00:00
Roger A. Light
200c316305 Changelog date. 2015-02-18 00:20:33 +00:00
Roger A. Light
1a14f6fed5 [453293] Don't quit loop_forever() if broker not available.
This is a workaround for bug #453293, a better solution is needed for
1.5.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=453293
2015-02-09 22:17:27 +00:00
Roger A. Light
c276fd9572 When using "log_dest file" the output file is now flushed periodically. 2015-02-05 22:29:49 +00:00
Roger A. Light
15e0236d43 [453850] Add -C option to mosquitto_sub.
Allows the client to quit after receiving count messages.

Replaces the (unreleased) -1 option.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=453850
2015-01-30 22:23:51 +00:00
Roger A. Light
9389d10636 [458843] Fix man page installation for cmake.
Thanks to Alexandre Zia.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458843
2015-01-30 21:29:08 +00:00
Roger A. Light
22e09ae613 [455402] Fix potential hang with pattern acls.
Fix hang if pattern acl contains a %u but an anonymous client connect.

Thanks to Christoph Krey.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=455402
2015-01-27 23:33:36 +00:00
Roger A. Light
1b4903b41e [431780] ACL files can contain a space in username/topic.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=431780
2015-01-27 23:33:36 +00:00
Roger A. Light
153e6e6211 [452914] Drop root privileges after listeners started.
This means that TLS private keys can be restricted to the root user.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=452914
2015-01-27 23:33:36 +00:00
Roger A. Light
87d8e1f705 Bridge support for MQTT v3.1.1. 2015-01-27 17:12:36 +00:00
Roger A. Light
8a35c3cd0d Add client support for MQTT v3.1.1. 2015-01-27 00:32:20 +00:00
Roger A. Light
c7fff62820 Update changelog. 2015-01-22 21:42:00 +00:00
Roger A. Light
9332a731bf [452915] mosquittopp now has a virtual destructor.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=452915
2015-01-15 22:48:24 +00:00
Roger A. Light
0adb2ed217 [425835] Support for "hour client expiration times.
This allows shorter values for the persistent_client_expiration option.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=425835
2015-01-15 21:57:03 +00:00
Roger A. Light
c591b06574 [457225] Add support for wildcard certificates.
This introduces wildcard certificate support for both bridges and
clients.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=457225
2015-01-15 21:35:59 +00:00
Roger A. Light
175794826b [456899] Broker: Add bridge_attempt_unsubscribe option.
The bridge_attempt_unsubscribe option has been added, to allow the sending
of UNSUBSCRIBE requests to be disabled for topics with "out" direction.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=456899
2015-01-07 21:50:10 +00:00
Roger A. Light
c12d3ebc0b [454852] Support setting keepalive on pub client.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=454852
2014-12-16 22:53:52 +00:00
Roger A. Light
fc1e514ad4 Add log_facility for non-Windows OSs. 2014-11-02 21:49:33 +00:00
Roger A. Light
6e0fd9e3ec SRV support is now not compiled in by default. 2014-10-17 22:11:14 +01:00
Roger A. Light
070d783c9f Merge 1.3.2-1.3.5 into 1.4. 2014-10-12 11:17:13 +01:00
Roger A. Light
f44b66a331 Bump version number. 2014-10-08 22:29:07 +01:00
Roger A. Light
8cb9b195e5 When using -v and the broker receives a SIGHUP, verbose logging was being disabled. This has been fixed. 2014-10-08 21:38:01 +01:00
Roger A. Light
bad7ec75f0 Temporarily disable ACL checks on subscriptions when using MQTT v3.1.1.
This is due to the complexity of checking wildcard ACLs against wildcard
subscriptions. This does not have a negative impact on security because
checks are still made before a message is sent to a client.  Fixes bug

Thanks to Jan-Piet Mens and Christoph Krey.
2014-10-08 21:16:34 +01:00
Roger A. Light
429c892557 Fix saving persistent database on Windows.
Thanks to Daniel Degasperi.
2014-10-08 20:51:17 +01:00
Roger A. Light
43556537e3 Don't ask for client cert when require_certificate is false. 2014-10-07 23:20:46 +01:00
Roger A. Light
1e87697359 Fix mutex being incorrectly passed by value. Fixes bug #1373785. 2014-10-05 21:56:44 +01:00
Roger A. Light
4a19d9ae3a Fix possible memory leak when using a topic that has a leading slash.
Fixes bug #1360986.
2014-10-05 21:24:08 +01:00
Roger A. Light
42420cae46 Add experimental SOCKS5 support for the clients. 2014-09-30 00:56:57 +01:00
Roger A. Light
e9c18f8347 mosquitto_loop_forever now quits after a fatal error, rather than blindly retrying. 2014-09-30 00:42:30 +01:00
Roger A. Light
57bb64aae1 Bump version number. 2014-08-06 00:28:15 +01:00
Roger A. Light
b6eddea55b Update changelog. 2014-08-02 22:19:01 +01:00
Roger A. Light
d8a3ab7d56 Don't ask client for certificate when require_certificate is false.
Thanks to Jan-Piet Mens.
2014-08-02 21:40:54 +01:00
Roger A. Light
8e7736b78e Fix incorrect handling of anonymous bridges on the local broker.
Thanks to Jan-Piet Mens.
2014-08-01 21:34:21 +01:00
Roger A. Light
4d9477abc7 Version bump 2014-07-13 22:54:19 +01:00
Roger A. Light
e5aa843ec7 Don't allow access to clients when authenticating if a security plugin returns an application error. Fixes bug #1340782.
Thanks to Charlie Davis.
2014-07-13 21:20:18 +01:00