Commit Graph

115 Commits

Author SHA1 Message Date
Abilio Marques
e9af914cf0 add subcribe hooks on plugin API
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2023-01-16 10:30:57 +00:00
Abilio Marques
1677d1aed2 allow message modification on output
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2023-01-16 10:29:50 +00:00
Roger A. Light
1081661f74 Refactor client structs. 2023-01-16 10:21:12 +00:00
Roger A. Light
5364410615 Rename members 2023-01-16 10:21:12 +00:00
Roger A. Light
7013a3502d Refactor client_msg structs 2023-01-16 10:21:12 +00:00
Roger A. Light
3634f18bc9 Refactor subscription structs 2023-01-16 10:21:12 +00:00
Roger A. Light
100fd31530 Refactor base_msg structs. 2023-01-16 10:21:12 +00:00
Roger A. Light
ef4ed0e97f Add missing "future" entry to persist evt structs 2022-12-16 22:34:58 +00:00
Roger A. Light
fc84340820 Add mosquitto_unsubscribe2_v5_callback_set 2022-12-07 15:05:54 +00:00
Roger A. Light
7419aa7530 Add more lib msg sequence tests 2022-12-07 15:05:54 +00:00
Roger A. Light
5c0cfade12 Add http origin checking to built in websockets. 2022-12-03 22:14:12 +00:00
Roger A. Light
65a6191202 Set mosquitto_read_*() values to NULL when empty
`mosquitto_property_read_binary/string/string_pair` will now set the
name/value parameter to NULL if the binary/string is empty. This aligns the
behaviour with other property functions.

Closes #2648. Thanks to Alexander Fiebig.
2022-11-03 18:31:19 +00:00
Roger A. Light
16feb14a57 Persistence interface updates and sqlite plugin fixes
The MOSQ_EVT_PERSIST_CLIENT_MSG_CLEAR event has been removed, due to
never being called. It is the responsibility of the plugin to remove
client subscriptions and client messages when the client is removed.

Lots of persist test improvements and additions - mostly checking item
counts.
2022-10-09 22:17:47 +01:00
Roger A. Light
dd30dc8bd1 Fix typo 2022-10-09 11:10:30 +01:00
Roger A. Light
fd68bf00c7 Merge branch 'master' into develop 2022-08-17 16:18:24 +01:00
Roger A. Light
966601f6b6 Bump version, new web post 2022-08-16 13:03:44 +01:00
Roger A. Light
6468bb4f9b Fix documentation omission around mosquitto_reinitialise.
Closes #2489. Thanks to rroguski
2022-08-10 14:31:34 +01:00
Roger A. Light
ba6bbd5959 Add documentation of struct mosquitto_message to header.
Closes #2561.
2022-08-08 00:01:56 +01:00
Roger A. Light
86117d44d4 Windows: Add exports for new public broker functions. 2022-07-21 15:07:44 +01:00
Roger A. Light
1e4dbd81fd Update mosquitto_[un]subscribe*() requirements. 2022-07-20 20:04:05 +01:00
Roger A. Light
b6b8039914 Fix use of MOSQ_OPT_TLS_ENGINE being unable to be used.
This was due to the openssl ctx not being initialised until starting to connect.

Closes #2537. Thanks to chessing-c4.
2022-05-17 17:19:17 +01:00
Roger A. Light
5731dd8653 Add mosquitto_persistence_location() for plugins. 2022-05-05 16:18:54 +01:00
Roger A. Light
efc8d064de Bring mosquittopp more up to date with libmosquitto. 2022-04-15 23:48:31 +01:00
Roger A. Light
5fcb2bc13f Simplify use of headers. 2022-04-15 23:08:21 +01:00
Roger A. Light
4c72542eae Move mosquittopp header to include dir. 2022-04-15 22:08:49 +01:00
Roger A. Light
40d8015837 Add MOSQ_EVT_SUBSCRIBE and MOSQ_EVT_UNSUBSCRIBE events.
These are called when subscribe/unsubscribes actually succeed.
2022-03-31 14:24:11 +01:00
Roger A. Light
7552e944a8 Long overdue bump of in-development version number. 2022-03-24 16:06:43 +00:00
Roger A. Light
a61298d03a Fix persist docs
Add mosquitto_persist_client_msg_clear() for completeness.
2022-03-18 09:57:26 +00:00
Roger A. Light
0a4a029fbf Persist plugin: Simplify cases where we don't take a copy.
Some members of the persist plugin interface are only used to find a
client struct, for example. There is no need for the plugin to allocate
a new copy and the broker to free it in that case.
2022-03-16 22:18:45 +00:00
Roger A. Light
2ed05539c7 Merge branch 'develop' of https://github.com/Daedaluz/mosquitto into Daedaluz-develop 2022-03-10 10:16:45 +00:00
Roger A. Light
cbb01193a0 Rename persist retain_add to retain_set 2022-03-01 20:55:56 +00:00
Roger A. Light
2d3b152a22 Rename of mosquitto_msg_store struct.
struct mosquitto_msg_store -> struct mosquitto_base_msg

This is the base message which client messages and retained messages
refer to. The base messages are still held in the message store.

This change comes about because the persistence interface exposes these
message types. Prior to this commit the different messages were "msg",
"client_msg", and "retain". After this commit there is "base_msg",
"client_msg", and and "retain_msg" in the persist interface.
2022-03-01 10:44:47 +00:00
Norbert Heusser
e7e8b6e832 * Added list of connections to dynsec/getClient response
* Added new helper function mosquitto_apply_on_all_clients to broker
* Refactoring in dynamic-security plugin

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-02-21 16:27:26 +00:00
Roger A. Light
78ee04cc27 Add mosquitto_client() for plugins, rearrange changelog. 2022-02-01 09:56:09 +00:00
Roger A. Light
f5625f499f Client HTTP request size configurable. 2022-01-13 19:39:04 +00:00
Roger A. Light
0a0f4ead42 Plugin interface interface and test improvements. 2022-01-09 23:43:12 +00:00
Roger A. Light
01b3e04362 Rename remove to delete in external interface.
This is consistent with usage in the dynsec plugin.
2021-12-16 00:00:17 +00:00
Roger A. Light
9ce09de2e6 Add MOSQ_EVT_PERSIST_CLIENT_MSG_CLEAR plugin event. 2021-12-13 22:19:29 +00:00
Roger A. Light
ff41157c2c Persistence interface documentation, plus better heap/non heap params
Be clear about whether the plugin or the broker owns `plugin_*` memory after function calls are made.
2021-11-25 23:05:21 +00:00
Roger A. Light
68fbb7b5bb auth method needs persisting. 2021-11-25 10:32:02 +00:00
Roger A. Light
6d3f85cf0c Have const/non const members.
Broker to plugin must be const.
Plugin to broker may need to be non-const.
2021-11-24 23:02:46 +00:00
Roger A. Light
0f8733627a Plugin persistence interface. 2021-11-24 19:26:07 +00:00
Roger A. Light
cfe078cd32 Document function. 2021-11-24 16:03:02 +00:00
Roger A. Light
2501a64035 Merge branch 'master' into develop 2021-11-23 12:53:50 +00:00
Roger A. Light
6fbdd71306 Broker id setting
This allows different brokers to share e.g. the same sql database and still have unique stored message ids.
2021-11-17 17:35:14 +00:00
Roger A. Light
2a056f14c2 Bump version number, update web. 2021-11-17 00:26:03 +00:00
Roger Light
cd07f1136b Bump copyrights. 2021-11-03 22:10:06 +00:00
Roger A. Light
8ac11929cc Merge branch 'master' into develop 2021-10-27 17:19:33 +01:00
Roger A. Light
292e969140 Bump version, update web. 2021-10-27 16:40:21 +01:00
Roger A. Light
46a6c5d17b Fix mosquitto_plugin.h not including mosquitto_broker.h.
Closes #2350. Thanks to Wolfgang Petroschka.
2021-10-27 16:23:20 +01:00