Commit Graph

1067 Commits

Author SHA1 Message Date
Roger A. Light
96a9d445c9 Fix build dep typo. 2017-02-06 22:41:34 +00:00
Fredrik Fornwall
23b0891048 Include <syslog.h> instead of <sys/syslog.h>
Using the standard <syslog.h> header instead of <sys/syslog.h> makes it
consistent with other source files and fixes compilation on Android.

Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
2017-01-30 21:15:19 +00:00
Fredrik Fornwall
532273250c Check for rt and pthread libraries before linking
This fixes building on Android which does not have separate librt
or libpthread libraries.

Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
2017-01-30 21:00:25 +00:00
Adam Bogdał
a8194f0c2d Update docker config path (#349)
Signed-off-by: Adam Bogdał <adam@bogdal.pl>
2017-01-21 08:22:13 +00:00
Roger A. Light
9b05b12039 More file closing fixes. 2017-01-21 07:54:48 +00:00
Roger A. Light
a2a2099fa1 Fix error message when websockets http_dir directory does not exist. 2017-01-20 21:18:18 +00:00
Roger A. Light
8171a975ae [354] Close http files even on bad clients.
Thanks to jbwdevries.

Bug: https://github.com/eclipse/mosquitto/issues/354
2017-01-20 18:25:04 +00:00
Roger A. Light
7f66bf1f65 [316] Don't error on zero length persistence files.
Closes #316.

Bug: https://github.com/eclipse/mosquitto/issues/316
2017-01-06 00:44:17 +00:00
Roger A. Light
ef417a6688 Don't use reserved identifiers in public headers. 2017-01-05 21:42:24 +00:00
Roger A. Light
53616be0e2 Fix 1.4.10 docker files. 2017-01-05 21:32:41 +00:00
Adam Giemza
37cbadc311 added docker support for version 1.4.10-r2 based on alpine 3.5 (#346)
Signed-off-by: Adam Giemza <adam.giemza@gmail.com>
2017-01-05 21:23:58 +00:00
David Audet
25a1f7d199 Update Dockerfiles to not save the apk cache
When installing the Mosquitto package from Alpine Linux, we don't need
to save the latest package index to the cache. We are specifically requesting
the latest package index each time we install Mosquitto and not using the local
cache at all (--no-cache).

Signed-off-by: David Audet <david.audet@ca.com>
2017-01-05 21:20:00 +00:00
Jens Breitbart
fbb60d67a7 Fix compiler warnings (unused parameter, additional semicolon).
A modern version of the clang compiler complained about:
* unused parameters
* additional semicolon
. This commit fixes these warnings.

Signed-off-by: Jens Breitbart <jbreitbart@gmail.com>
2016-12-10 20:02:19 +00:00
Roger A. Light
2c2ba2cf10 [329] Fix potential negative timeout being passed to pselect.
Thanks to Dollars.

Bug: https://github.com/eclipse/mosquitto/issues/329
2016-12-08 21:06:45 +00:00
Roger A. Light
b55b47efd3 Fix potential socket leakage when reconnecting.
Bug: https://github.com/eclipse/mosquitto/issues/304
2016-12-04 22:01:20 +00:00
Teun Lassche
dac29a5a5f Fix #304 Socket leakage
Signed-off-by: Teun Lassche <contact@thlassche.nl>
2016-12-04 22:00:53 +00:00
Roger A. Light
93464179f1 Update changelog. 2016-12-04 21:51:31 +00:00
Ben Hardill
740b710a0b Add support for local only bridge notifications (#328)
This update adds an option to only publishes bridge
notification messages to the local side of the bridge.

It adds a config file option called notifications_local_only
that accepts a boolean value, defaults to false to be
consistent with existing behaviour.

Fixes #233

Signed-off-by: Ben Hardill <hardillb@uk.ibm.com>
2016-12-04 21:47:38 +00:00
Roger A. Light
6f7a0bff4b [323] Allow outgoing IPv6 connections to use TLS.
Bug: https://github.com/eclipse/mosquitto/issues/323
2016-11-30 11:31:30 +00:00
Roger A. Light
1abd089afb [295] Usage should say we support 3.1.1 as well as 3.1.
Closes #295.

Bug: https://github.com/eclipse/mosquitto/issues/295
2016-10-20 13:48:30 +01:00
Roger A. Light
51bfdc9ed4 Improve logo files.
Make mosquitto-logo-only.svg square.
Add mosquitto-logo-min.svg which is more suitable for very small images.
2016-10-05 15:52:09 +01:00
Roger A. Light
b3a1604646 Update changelog. 2016-09-29 21:08:02 +01:00
tucic
f272e2e047 Maximum connections for websockets listener (#271)
Check current number of connections before accepting new websockets clients.

Signed-off-by: tucic <tucic.milan@gmail.com>
2016-09-29 18:51:31 +01:00
David Audet
5487395fb6 Adding Dockerfiles to build versioned Docker images (#226)
* Adding Dockerfiles to build versioned Docker images

Dockerfiles have been added to create Docker
images for Mosquitto v1.4.4 and v1.4.8 using Alpine
Linux as a base.

Different directories have been added for each version
to decouple the configuration and entrypoint scripts.
Currently they contain the same content, but this could
change in the future.

Docker Hub will also need to pull from specific directories
when official docker images will be built and hosted on
Docker Hub.

* Removing unnecessary default config and volumes

Mount points are created in the image, but volumes are not automatically
created. The user can still create volumes for these mount points, but is
not required to.

The default configuration file is now copied from /etc/mosquitto/mosquitto.conf
to /mosquitto/config/mosquitto.conf. The user can override this file by
mounting a local configuration file to /mosquitto/config.

Signed-off-by: David Audet <david.audet@ca.com>
2016-09-21 21:35:05 +01:00
Roger A. Light
762126064c [259] Fix crash when "lazy" type bridge attempts to reconnect.
Thanks to hakofugu41.

Bug: https://github.com/eclipse/mosquitto/issues/259
2016-09-20 23:26:14 +01:00
Roger A. Light
7ace6c9e7e Merge branch 'master' into fixes 2016-09-20 23:25:17 +01:00
Roger A. Light
a71bee494f HASH_DELETE needs to modify subhier. 2016-09-16 12:46:32 +01:00
Roger A. Light
9ddec11f89 Fix Coverity issue 1362805. 2016-09-15 22:22:28 +01:00
Simon Marchi
97bfa506db Add pkg-config files to CMake build (#213)
This patch adds pkg-config files for libmosquitto and libmosquittopp,
and installs them through CMake.

Refs #107

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2016-09-10 21:48:50 +01:00
Karl Palsson
374c62586e db_dump: use objects to simplify printing (#215)
Prepratory work for providing more filtering of the output dump.
This makes _no_ difference to the current behaviour, but makes it much
simpler for people who "need", for whatever reason, to hack some private
changes into the db_dump tool.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-09-10 13:10:01 +01:00
Roger A. Light
41a1b51c31 Print warning, skip test if paho-mqtt not available. 2016-09-10 09:11:26 +01:00
Roger Light
5cc87f80b4 Merge pull request #200 from remakeelectric/drafts/byte-limits1
Implement byte limits for message queues
2016-09-10 09:08:30 +01:00
Karl Palsson
2dec0ed895 broker: fix queue_qos0_messages behaviour
Prior, offline qos0 clients had an unlimited queue depth when
queue_qos0_messages was true.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-09-09 17:27:46 +00:00
Karl Palsson
c6aac741c2 broker: support byte based queueing
Limiting queued message depth purely based on message count is hard to
control for memory constrained devices.  The size of messages can vary
wildly, from a few bytes, to a few kilobytes.  Support a new
max_queued_bytes option, and drop packets when the first limit is
reached.  Option defaults to 0 (disabled) by default.
Support also a max_inflight_bytes variable, with similar behaviour.

Fixes (partof) https://github.com/eclipse/mosquitto/issues/100

This pulls up some helper routines for calculating whether to allow
inflight or queuing, resolving some inconsistences in connection
resumption.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-09-09 17:27:39 +00:00
Karl Palsson
03d4b8c270 websockets: fix compatibility with older lws versions (#260)
In 1.3, 1.4 and 1.5, the function was "libwebsockets_get_protocol" not
"libwebsocket_get_protocol"  While the #define name doesn't matter on
newer libwebsockets, where it redirects to lws_get_protocol, the naming
is critical for older versions.

Fixes: 477cd3e399 (Fix missing context->listener for websocket client)

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-09-08 12:24:29 +01:00
Karl Palsson
642e141c23 conf: max_queued_messages: clarify per client limit
Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-08-17 11:14:31 +00:00
Karl Palsson
8268e6da08 database: drop unnecessary local variable
No need to maintain count and context->msg_count separately.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-08-17 11:14:31 +00:00
Karl Palsson
8a48fd13f1 broker: publish initial load averages
This publishes initial 0 figures for all load averages, as is done for
all the existing counter values in the SYS tree.  This makes the
behaviour of certain variables use for diagnostics (stored count for
instance) more predictable, instead of changing due to the creation of
load topics as soon as the load became non-zero.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-08-17 11:14:31 +00:00
Karl Palsson
30c96f4a1c broker: track stored messages in bytes as well as count
Instead of simply tracking the count of stored messages, keep track of
the total byte size of stored messages.  While only informational at
this point, it provides the basis for byte based limits in the future.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-08-17 10:35:26 +00:00
Karl Palsson
9d00eab64c tests: support generating longer publish packets
Remaining length for publish packets wasn't being handled completely.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-08-17 10:27:37 +00:00
Karl Palsson
641158aed9 config: garbage line number if file not found
If the file is not found, showing 0 rather than a garbage number is
mildly better.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-08-17 10:27:37 +00:00
Roger A. Light
ee1fd1718b Merge branch 'fixes' 2016-08-16 22:56:28 +01:00
Roger A. Light
87b6a746fd Bump version number. 2016-08-16 22:52:22 +01:00
kcallin
7ba3f3d33b [189] Mosquitto database corrupted on power-loss. (#206)
Mosquitto database writes are not atomic and if power is lost during
a write the file will be permanently lost.  This commit makes writes as
atomic as possible.

Signed-off-by: Keegan Callin <kc@kcallin.net>
Bug: https://github.com/eclipse/mosquitto/issues/189
2016-08-16 22:36:58 +01:00
Roger A. Light
ba2de88790 Display error if broker unable to open the log file.
Thanks to Matthew Treinish.

Bug: https://github.com/eclipse/mosquitto/issues/234
2016-08-16 22:31:36 +01:00
Pierre Fersing
477cd3e399 Fix missing context->listener for websocket client (#239)
The context associated with websocket client didn't had listener
filled, which caused use_username_as_clientid to be ignored.

Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
2016-08-16 22:10:41 +01:00
Roger A. Light
00aa181749 [244] Add note on compiling auth plugin on OSX.
Closes #244.

Bug: https://github.com/eclipse/mosquitto/issues/244
2016-08-12 08:00:56 +01:00
Roger A. Light
840453c14f Remove -x from mosquitto_sub - this is provided by -F now. 2016-08-10 12:24:43 +01:00
Roger A. Light
8140ce1f24 Add -F to mosquitto_sub to allow users to choose the output format. 2016-08-10 12:24:43 +01:00
Roger A. Light
b1c4171cdc Merge branch 'develop' of github.com:eclipse/mosquitto into develop 2016-08-10 12:22:39 +01:00