Commit graph

113 commits

Author SHA1 Message Date
Roger A. Light
e09390eda6 Split db__message_insert into incoming/outgoing. 2021-11-11 14:47:02 +00:00
Roger A. Light
9ad8d943be Stored messages now always stored in a hash table. 2021-11-11 11:20:30 +00:00
Roger A. Light
a1288721ce Fix tests 2021-10-27 17:22:58 +01:00
Roger A. Light
8ac11929cc Merge branch 'master' into develop 2021-10-27 17:19:33 +01:00
Roger A. Light
b9b065d2cc Compiler pedantry, and more checks in tests. 2021-10-14 11:39:46 +01:00
Roger Light
9d3f292b39 Send DISCONNECT With session-takeover return code.
This is for MQTT v5 clients when a client connects with the same client id.

Closes #2340. Thanks to hvxl.
2021-10-12 23:20:53 +01:00
Roger Light
51eda2bf79 Add more efficient keepalive check. 2021-10-12 17:19:42 +01:00
Roger A. Light
a1a190b482 Pointless whitespace tidy. 2021-10-05 15:20:37 +01:00
Roger A. Light
c28110d079 Fix test 2021-10-01 17:24:19 +01:00
Roger A. Light
aa29b45e70 Merge branch 'master' into develop 2021-09-07 19:17:11 +01:00
Roger Light
ba2ca33671 Strict protocol compliance fixes, and extensive test suite. 2021-08-23 23:19:28 +01:00
Roger A. Light
a02aad0a9c Add mosquitto_sub_matches_acl_with_pattern. 2021-07-08 17:45:50 +01:00
Roger A. Light
f90e55bd36 Reduce memory allocations when sending packets. 2021-06-30 14:53:34 +01:00
Roger A. Light
e0309acebc Add mosquitto_sub_matches_acl()
This moves the sub matching sub code from the dynsec plugin to the library and broker, and removes all of the malloc calls at the same time.
2021-06-10 22:19:39 +01:00
Roger A. Light
b3045d1adf Fix pattern matching with invalid prefix. 2021-06-10 22:19:39 +01:00
Roger A. Light
6502d6e5f4 Add mosquitto_topic_matches_sub_with_pattern()
And use it in the default security checks.
2021-06-10 15:33:01 +01:00
Roger A. Light
906a515704 Simplify client message properties, only one is used. 2021-06-02 15:15:01 +01:00
Roger A. Light
fb76fd66b9 Remove some unused struct members. 2021-06-02 15:15:01 +01:00
Roger A. Light
5177dd4d40 Use random last db id, unless later overwritten by persistence. 2021-05-27 11:22:02 +01:00
Roger Light
0eb7391e71 Fix tests and db_dump compilation. 2021-05-06 00:06:58 +01:00
Roger A. Light
8a03b5ad5c Function for checking if a context is connected. 2021-05-02 23:19:54 +01:00
Roger Light
fecf550cad Fix test. 2021-03-14 13:13:44 +00:00
Roger A. Light
706a1f3f29 Fix more minor compiler warnings. 2021-01-21 13:33:54 +00:00
Roger A. Light
fdd624cec4 Fix tests now uhpa has been removed. 2020-11-25 09:19:05 +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
4d9afc835b Fix missing functions in test. 2020-11-05 09:06:51 +00:00
Roger A. Light
899695261a Fix invalid character conversions in test. 2020-10-21 13:19:28 +01:00
Roger A. Light
4f61f6c161 Fix conversion errors. 2020-10-17 01:23:08 +01:00
Roger A. Light
a65f946e83 Move headers to own directory. 2020-10-07 22:06:01 +01:00
Roger A. Light
c90e49af1b Merge remote-tracking branch 'origin/fixes' into develop 2020-09-24 17:03:14 +01:00
Roger A. Light
54b9571516 Enable TLS with certfile+keyfile, not capath/cafile. 2020-09-23 23:31:00 +01:00
Roger Light
58aa41c813 Optimise use of db__message_write()
New messages are now queued for clients when old ones are sent, rather than on every iteration of the main loop. This produces good performance improvements.
2020-08-12 15:29:08 +01:00
david-beinder
c11d20f82c Database v6 tests
keep v5 client read test to test for backwards compatability
adds username="usrname" and listener_port=1883 for v6 tests

Signed-off-by: david-beinder <david.beinder@mce.li>
2020-08-07 08:56:52 +02:00
Roger A. Light
b5be4fb4af Fix test 2020-07-16 09:36:42 +01:00
Roger A. Light
6deb417804 Simplify db__message_store() interface. 2020-07-10 16:09:33 +01:00
Roger A. Light
e3e8dc4ea4 Allow send__pub{ack,rec,rel,comp} to send properties. 2020-07-10 12:29:53 +01:00
Roger A. Light
bb0e5bb7d3 Add missing header. 2020-05-05 14:20:56 +01:00
Roger A. Light
cef9d891ae Tidy up main(). 2020-04-08 11:34:31 +01:00
Michael
4d658bd569 Fix compile error/warning
Signed-off-by: Michael Liu <michael.liu.point@gmail.com>
2020-03-12 12:13:26 +00:00
Roger A. Light
d96543c0b8 Merge branch 'fixes' into develop 2020-03-03 12:54:57 +00:00
Roger A. Light
8d5fd7d1e2 Fix mosquitto_topic_matches_sub() behaviour with wildcards in topic.
It was not returning MOSQ_ERR_INVAL if the topic contains a wildcard.

Closes #1589. Thanks to mdelete.
2020-02-07 22:55:50 +00:00
Gianfranco Costamagna
7a5c2d4da5 Bugfix: include "deps" directory only if BUNDLED_DEPS has been provided and set to true
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
2020-02-06 15:20:29 +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
Roger A. Light
70fd600c3a Fix trailing whitespace not being trimmed on acl users.
Closes #1539. Thanks to CliveJL and LeonPoon.
2020-01-30 19:52:46 +00:00
Roger A. Light
9ee6e2725c Start of tests for adding subscriptions. 2019-12-04 11:02:52 +00:00
Roger Light
d92360dd8e Split sub and retain trees. 2019-11-22 14:07:15 +00:00
Roger A. Light
fad184c9c2 Bridge remapping refactoring and tests. 2019-10-03 16:46:15 +01:00
Roger A. Light
8463c33720 Refactor property remaining length calculation. 2019-10-03 10:36:24 +01:00
Roger A. Light
552059e17d Pedantic test fixes from failgrind. 2019-07-30 15:01:12 +01:00
Roger A. Light
e43a278652 Fix test compilation. 2019-05-28 22:12:13 +01:00