Commit Graph

42 Commits

Author SHA1 Message Date
Roger A. Light
3731535298 Add SPDX license identifiers. 2020-12-01 20:46:56 +00:00
Roger A. Light
584cf51ba7 Update to EPL-2.0 2020-11-25 17:34:21 +00:00
Roger A. Light
adfa9f1e21 Always zero terminate payloads (removes uhpa support) 2020-11-24 12:24:40 +00:00
Roger A. Light
d26534e22b Fix Coverity scan issues.
1302840
1353078
1431131
1431134
1431135
1436826
1436827
1436828
1436830
1436831
1436834
1436835
1436838
1436839
1436840
1436844
1436846
1436853
1436854
1436859
1436860
1436861
1436863
1436867
2020-11-23 22:05:12 +00:00
Roger A. Light
e7a4e73cd8 Fix listener not being reassociated with client.
This occurred when reloading a persistence file and
`per_listener_settings true` is set and the client did not set a
username.

Closes #1891. Thanks to Mikkel Nepper-Christensen.
2020-11-12 17:36:49 +00:00
Roger A. Light
b816d46508 Use db as a global var instead of passing to functions.
This allows a big swath of ifdefs to be removed. It also means savings as the db var is not passed around all of the time, and makes it easier to remove the final broker call to mosquitto_time() call in packet_mosq.c. In one test this reduced the calls to mosquitto_time() from 295k to 48k.
2020-11-06 17:16:23 +00:00
Roger A. Light
4f61f6c161 Fix conversion errors. 2020-10-17 01:23:08 +01:00
Roger A. Light
c90e49af1b Merge remote-tracking branch 'origin/fixes' into develop 2020-09-24 17:03:14 +01:00
david-beinder
212fd8635f Store username and listener of persistent clients
Signed-off-by: david-beinder <david.beinder@mce.li>
2020-08-07 08:32:14 +02:00
Roger A. Light
4f9a1a53ce Fix incorrect store ref count usage. 2020-07-16 11:18:04 +01:00
Roger A. Light
6deb417804 Simplify db__message_store() interface. 2020-07-10 16:09:33 +01:00
Roger A. Light
eae8c9aab4 Fix check when loading persistence file of a different version
Closes #1684. Thanks to grekhss.
2020-05-15 22:11:26 +01:00
Roger A. Light
c5d6f32341 Be more tolerant when loading persistence files. 2020-05-01 21:51:07 +01:00
Roger A. Light
c84d175b3d Fixes for the poor souls stuck on <c99.
Closes #1622.
2020-03-12 10:29:11 +00:00
Roger A. Light
d96543c0b8 Merge branch 'fixes' into develop 2020-03-03 12:54:57 +00:00
Roger A. Light
b0a065f790 Update changelog. Release page. Bump copyright. 2020-02-27 23:26:58 +00:00
Roger A. Light
c4e41f3444 Back port db_dump from develop.
Closes #1519. Thanks to Christoph Krey.
2020-02-06 16:44:04 +00:00
Roger A. Light
27b4518d7e Improve password file parsing in the broker and mosqitto_passwd.
Closes #1584. Thanks to panava.
2020-02-04 16:38:51 +00:00
Panagiotis Vasilikos
618413e1d2 Resource leak in persist_read.c
Reason: In lines 435 and 439, the function returns without calling closing
fptr which was opened at line 399.

Fix: I added fclose(fptr) statements before each of the returns.
Signed-off-by: Panagiotis Vasilikos <panagiotis.vasilikos@alexandra.dk>
2020-01-29 13:30:24 +01:00
Roger A. Light
3f0c202aa5 Reduce heap allocation churn when tokenising topics. 2019-12-11 13:23:59 +00:00
Roger A. Light
c0443637e8 Merge branch 'master'
Conflicts:
	ChangeLog.txt
	config.mk
	src/context.c
	src/loop.c
	src/subs.c
	test/broker/01-connect-bad-packet.py
	test/broker/02-subpub-qos1-bad-pubcomp.py
	test/broker/02-subpub-qos1-bad-pubrec.py
	test/broker/02-subpub-qos2-bad-puback-1.py
	test/broker/02-subpub-qos2-bad-puback-2.py
	test/broker/02-subpub-qos2-bad-pubcomp.py
	test/broker/02-subpub-qos2.py
	test/broker/07-will-null-topic.py
2019-12-03 13:59:05 +00:00
Roger Light
d92360dd8e Split sub and retain trees. 2019-11-22 14:07:15 +00:00
Roger A. Light
06a27e799f Fix retained messages with an expiry interval not being expired.
This happened after being restored from persistence.

Closes #1464. Thanks to Dustin Sallings.
2019-10-31 12:54:20 +00:00
Roger A. Light
1c1ccaee52 Merge branch 'master' into develop 2019-08-06 15:04:36 +01:00
Roger A. Light
c269e6f019 db_dump: Update for version 5 file format
Closes #1320. Thanks to Christoph Krey.
2019-08-01 15:49:25 +01:00
Roger A. Light
f974b91084 Consistent ref counting inc and dec functions. 2019-05-22 13:20:45 +01:00
Roger A. Light
f64d3b1e5c Fix broker originated messages not being sent.
This occurred when `check_retain_source` was set to true.

Closes #1245. Thanks to Christoph Krey.
2019-04-30 13:25:54 +01: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
fb8a2baaad Refactor client msgs to use utlist to reduce code complexity. 2019-04-03 14:13:12 +01:00
Roger A. Light
12e5efbee2 Typo. 2019-03-26 22:20:04 +00:00
Roger A. Light
0ca093060c Fix Coverity Scan defect 1400433. Integer overflow. 2019-03-26 14:14:46 +00:00
Roger A. Light
9faad1e078 Fix a variety of scan-build warnings. 2019-03-26 14:00:42 +00:00
Roger A. Light
43c159b9a5 Support and tests for saving message expiry interval. 2019-03-25 23:17:57 +00:00
Roger A. Light
5841da2c36 Tests for persisting message store properties. 2019-03-24 21:38:00 +00:00
Roger A. Light
efb20625fb Code and tests for persisting client msg properties. 2019-03-23 22:52:08 +00:00
Roger A. Light
48253bc12c Persist message store publish properties. 2019-03-21 21:43:36 +00:00
Roger A. Light
2f15a7be2b Add subscription-identifier and options to persistence. 2019-03-21 14:19:48 +00:00
Roger A. Light
214a5f3aab v5 persistence file format
This includes changes to improve read/write performance.
It is not complete, and will have further changes to add properties and anything else required for MQTT v5.
2019-03-21 00:35:56 +00:00
Roger A. Light
a0e54ac065 Function for reading persist file chunk header. 2019-03-19 17:13:08 +00:00
Roger A. Light
a7d0660749 Separate out persist reading code from restoring code. 2019-03-16 09:42:15 +00:00
Roger A. Light
9411d94842 Start of tests for persistence reading. 2019-03-14 20:57:25 +00:00
Roger A. Light
b6356735b4 Split persist read/write into separate files for easier testing. 2019-03-14 11:08:30 +00:00