Commit Graph

364 Commits

Author SHA1 Message Date
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
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
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
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
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
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
b1c4171cdc Merge branch 'develop' of github.com:eclipse/mosquitto into develop 2016-08-10 12:22:39 +01:00
Roger A. Light
883af8af53 Better subtree searching. 2016-07-19 15:05:53 +01:00
Roger A. Light
0b5d524723 Update defer plugin function signatures. 2016-07-11 14:29:41 +01:00
Roger A. Light
e4db6a760f Backwards compatibility for auth plugins. 2016-07-10 23:17:30 +01:00
Roger A. Light
b40cedaf1d More client accessors. 2016-07-09 21:49:13 +01:00
Roger A. Light
025e56fd4c New mosquitto_auth_psk_key_get() 2016-07-08 13:52:02 +01:00
Roger A. Light
1a6d23feff Bump auth plugin version. 2016-07-08 13:27:31 +01:00
Roger A. Light
b3df015ea7 New mosquitto_unpwd_check(). 2016-07-08 13:27:14 +01:00
Roger A. Light
63f46a999f Add username accessor. 2016-07-08 11:50:50 +01:00
Roger A. Light
ccedc6d709 Moving towards new mosquitto_acl_check(). 2016-07-08 11:26:58 +01:00
Roger A. Light
45ad23c7be mosquitto_broker.h include file for end users. 2016-07-08 10:44:41 +01:00
Roger A. Light
017db6706f Rename mosquitto_broker.h -> mosquitto_broker_internal.h 2016-07-08 10:10:04 +01:00
Roger A. Light
8378fe44cf Update copyrights. 2016-07-08 09:42:24 +01:00
Roger A. Light
56d0f74725 Defer support for TLS-PSK. 2016-07-08 09:36:25 +01:00
Roger A. Light
8fcafcc6aa #define SYS_TREE_QOS 2016-07-08 09:15:28 +01:00
Roger A. Light
1b659b41de sys__ -> sys_tree__ 2016-07-08 09:14:11 +01:00
Roger A. Light
43bcf6799c Move static sys tree entries to sys_tree.c. 2016-07-08 08:46:24 +01:00
Karl Palsson
7cb8988192 websockets: fix compile fail after refactoring (#207)
A lot of function renaming was done in 663d50a016,
and this websockets patch was merged afterwards.  Autobuild testing
doesn't have websockets enabled, and missed this.

Fixes: d9142c3974
Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-07-07 14:19:54 +01:00
Roger A. Light
a04662265a Remove "mosq%d_vacuum" event as vacuum no longer done. 2016-07-03 22:42:43 +01:00
Roger A. Light
d54359598e Move signals/events code to own file. 2016-07-03 22:40:27 +01:00
Dmitry Kaukov
6bf8b59d89 Signalling mosquitto process on Win32, using named events: (#163)
mosqPID_shutdown
mosqPID_reload
mosqPID_backup
mosqPID_vacuum

where PID is the PID of the mosquitto process

Signed-off-by: Dmitry Kaukov <dkaukov@opentable.com>
2016-07-03 22:18:44 +01:00
Roger Light
6eb8b0c0e8 Merge pull request #190 from remakeelectric/db_dump-fixes
Db dump fixes
2016-07-01 15:34:12 +01:00
Roger A. Light
2b2279363b Bridge defaults to mqtt3.1.1 as per documentation. 2016-06-22 00:04:47 +01:00
Roger A. Light
1c3988a397 Merge branch 'master' into develop 2016-06-21 23:33:58 +01:00
Roger A. Light
63e3926987 Perform UTF-8 validation on will, sub, unsub topics in the broker. 2016-06-21 17:05:33 +01:00
Karl Palsson
339842b623 db_dump: (trivial) add missing newline in output
Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-06-21 12:29:58 +00:00
Karl Palsson
b1efd9a868 db_dump: properly print uint64_t
store id is a uint64_t, print it consistently.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-06-21 12:29:58 +00:00
Roger A. Light
d90cd585dd Add WITH_STRIP build option. 2016-06-13 21:36:41 +01:00
Roger A. Light
8663d6aff7 Merge branch 'master' of github.com:eclipse/mosquitto 2016-06-07 16:54:53 +01:00
Roger A. Light
ea2baa876c Fix rare possible crash when writing persistence file. 2016-05-31 22:17:27 +01:00
Roger A. Light
ff78cd7873 Fix publishing of $SYS/broker/clients/maximum. 2016-05-31 09:57:28 +01:00
Roger A. Light
6f5f445196 [169] mosquitto_passwd handles unknown cmd args properly.
Closes #169. Thanks to castorgodinho.

Bug: https://github.com/eclipse/mosquitto/issues/169
2016-05-26 09:25:41 +01:00
Roger A. Light
7761218d3c [170] Fix WS listeners not being able to bind to an IP.
Closes #170. Thanks to minghuadev.

Bug: https://github.com/eclipse/mosquitto/issues/170
2016-05-26 09:21:15 +01:00
Roger A. Light
afc2c9951c [57] File missed from previous commit.
Bug: https://github.com/eclipse/mosquitto/issues/57
2016-05-19 15:53:27 +01:00
Roger Light
dfeb2f9ba6 Merge pull request #141 from PierreF/large-queued-performance-2
Improve performance with lots of queued message
2016-05-15 22:31:35 +01:00
Roger A. Light
57da586703 Fix saving of persistence messages that start with a '/'.
Closes #151. Thanks to Andrew Chambers.

Signed-off-by: Roger A. Light <roger@atchoo.org>
2016-05-14 22:39:14 +01:00
Roger A. Light
3048c5ba0d Changelog update.
Fix reconnecting for bridges that use TLS on Windows.

Closes #154.

Thanks to Dmitry Kaukov.
2016-05-14 21:57:09 +01:00
Roger A. Light
6704df8061 Bridge config parameters can now contain a space
Closes #150.

Thanks to Sebastian Koch and Mikkel Kirkgaard Nielsen.

Bug: https://github.com/eclipse/mosquitto/issues/150
2016-04-28 21:54:50 +01:00
Ian Johnson
87112a7e21 On Mac, we don't want to run /sbin/ldconfig as it doesn't exist
Signed-off-by: Ian Johnson <ijohnson@wolfram.com>
2016-04-19 16:56:10 -05:00
Pierre Fersing
18cc0f5fc7 Fix bugs introduced by previous commit
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
2016-04-18 17:48:53 +02:00