Commit Graph

1946 Commits

Author SHA1 Message Date
Roger A. Light
efc8ed39af Fix incoming msgs not being removed when there are no subs
Fix incoming messages not being removed for a client if the topic being
published to does not have any subscribers.

Closes #1322. Thanks to Yannic Schröder.
2019-07-31 18:52:51 +01:00
Roger A. Light
b3f3513b35 Index update. 2019-07-31 12:06:14 +01:00
Roger A. Light
696a9b8019 Fix incomgin QoS 2 with max_inflight_messages set to 1.
Closes #1332. Thanks to xmas79.
2019-07-30 23:25:12 +01:00
Roger A. Light
f21ccc362b Fix mosquitto_string_option(, MOSQ_OPT_TLS_KEYFORM, ) return value
`mosquitto_string_option(mosq, MOSQ_OPT_TLS_KEYFORM, ...)` was incorrectly
returning `MOSQ_ERR_INVAL` with valid input. This has been fixed.

Closes #1360. Thanks to Michael Dombrowski.
2019-07-30 18:46:52 +01:00
Roger A. Light
42237c0239 Make behaviour of mosquitto_connect[_async]() consistent.
`mosquitto_connect_async()` is now consistent with `mosquitto_connect()`
when connecting to a non-existent server.

Closes #1345. Thanks to Mohammad Reza.
2019-07-30 18:42:31 +01:00
Roger A. Light
c32715d383 Set *name to NULL on failure. 2019-07-30 15:09:53 +01:00
Roger A. Light
46d12086c9 Set sock to invalid after closing. 2019-07-30 15:06:55 +01:00
Roger A. Light
552059e17d Pedantic test fixes from failgrind. 2019-07-30 15:01:12 +01:00
Roger A. Light
e3271e0c99 Don't define _GNU_SOURCE where already defined. Closes #1357. 2019-07-25 21:08:00 +01:00
Lucas Ramage
b9bd0bedad Fix typos for READMEs in Docker directory (#1340)
* Fix typo
2019-07-25 17:34:33 +01:00
Roger A. Light
b807daed28 Fix error codes not being returned when mosquitto_pub exits.
Closes #1354. Thanks to Ben Barbour.
2019-07-24 12:08:43 +01:00
Roger A. Light
3ad780839d Fix MQTT v5 sub opts being set for v3 subs.
Closes #1353. Thanks to Ben Barbour.
2019-07-24 11:25:46 +01:00
YangHau
9bb9b6e721 Remove redundant initialization in clients
the `memset(&cfg, 0, sizeof(struct mosq_config));` already exsits in
`client_config_load()`'s `init_config()` function call.
So calling it in main function is totally unnecessary.

Signed-off-by: YangHau <vulxj0j8j8@gmail.com>
2019-07-12 16:53:29 +08:00
Roger A. Light
13ac1080a0 Refactoring bridge code
This separates out a good amount from the main loop code.
2019-07-11 14:43:32 +01:00
Roger Light
2b2afc93bc Allow other apps access to log file on Windows.
This change means that users with the appropriate security permissions
can open the log file for reading at the same time that it is being
written.

Closes #515.
2019-07-03 11:56:46 +01:00
Timo Gurr
99ace10daf Install pkg-config files into arch dependent locations also for CMake builds
libmosquitto.pc and libmosquittopp.pc contain arch dependent information.
The Makefile based build already does this correctly.

Signed-off-by: Timo Gurr <timo.gurr@gmail.com>
2019-07-02 18:36:41 +02:00
Roger A. Light
d17d7c9229 Fix persistent clients being incorrectly expired on Raspberry Pis.
Closes #1272. Thanks to BowenMarmot and addendumE.
2019-06-25 17:01:41 +01:00
Roger A. Light
a5620d9d55 Update Docker to 1.6.3 2019-06-18 14:35:40 +01:00
Roger A. Light
be73f79200 Merge branch 'fixes' 2019-06-18 12:45:08 +01:00
Roger A. Light
4f32e94104 Bump release date. 2019-06-18 12:44:37 +01:00
Roger Light
be09731e4a
Merge pull request #1308 from dandrader/no-pthread_cancel-on-android
No pthread_cancel() on Android
2019-06-18 12:39:14 +01:00
Roger A. Light
e642bee336 Update changelog 2019-06-18 11:21:15 +01:00
Roger Light
5417467426
Merge pull request #1313 from matevzmihalic/fix-plugin-psk-v4
Fix plugin psk_key_get for v4
2019-06-18 10:46:06 +01:00
Matevz Mihalic
0a5fbc403b
Fix plugin psk_key_get for v4
Signed-off-by: Matevz Mihalic <matevz.mihalic@gmail.com>
2019-06-17 13:00:27 +02:00
Roger A. Light
7a581ab64f Add ca-certificates to snap for easier TLS use. 2019-06-14 08:51:29 +01:00
Roger A. Light
1d6aa9f69c Bump version and web pages. 2019-06-13 16:28:09 +01:00
Roger A. Light
af7760f1b6 Fix build for WITH_SOCKS=no. 2019-06-13 16:23:55 +01:00
Roger Light
5d64678331
Merge pull request #1304 from dandrader/fixConfigHIncludeGuard
Fix #include guard in config.h
2019-06-13 14:31:21 +01:00
Roger A. Light
c685b7ecf4 Fix mosquitto_pub -l not handling zero length input.
Closes #1302. Thanks to Marcus Watkins.
2019-06-06 23:21:07 +01:00
Roger A. Light
9dc319c183 Remove obsolete store_clean_interval from documentation. 2019-06-06 23:04:21 +01:00
Roger A. Light
1fa182d160 Fix incorrect shared subscription topic of '$shared.' 2019-06-06 23:03:18 +01:00
Roger A. Light
85388c01cc CLIENT_LDFLAGS now uses LDFLAGS.
Closes #1294. Thanks to Lucas Ramage.
2019-06-06 23:02:29 +01:00
Roger A. Light
6b6ea3de16 Remove old man page references.
Thanks to Karl Palsson.

Closes #1266.
2019-06-06 23:01:04 +01:00
Roger A. Light
31f448f35a Fix MQTT v5 clients not being able to specify a password without a username.
Thanks to Erik Moqvist.

Closes #1274.
2019-06-06 23:01:04 +01:00
Roger A. Light
3e858c19c1 Improve documentation around the upgrading of persistence files.
Thanks to jsaak.

Closes #1276.
2019-06-06 23:00:29 +01:00
Roger A. Light
6d71d4b5c4 Fix typo causing build error on Windows when building without TLS support.
Thanks to TimmvonderMehden.

Closes #1264.
2019-06-06 22:59:59 +01:00
Roger A. Light
289de1f8c8 Fix mosquitto_pub exiting with error code 0 when an error occurred.
Thanks to janniswarnat.

Closes #1285.
2019-06-06 22:59:01 +01:00
Roger A. Light
4d54a51c62 Stop some error messages being printed even when --quiet was used.
Thanks to Rob de Jonge.

Closes #1284.
2019-06-06 22:58:02 +01:00
Daniel d'Andrada
0970451762 pthread_cancel() is not available on Android
Thus mosquitto_loop_start() and mosquitto_loop_stop()
won't be available there (and mosquitto_connect_async()
as a consequence).

Signed-off-by: Daniel d'Andrada <daniel.dandrada@esrlabs.com>
2019-06-06 15:04:14 +02:00
Daniel d'Andrada
24ec29237d Fix #include guard in config.h
Signed-off-by: Daniel d'Andrada <daniel.dandrada@esrlabs.com>
2019-06-04 10:21:04 +02:00
Roger A. Light
c6291034c5 Disable tests for cmake. 2019-06-01 11:17:45 +01:00
Roger A. Light
587debc013 Fix incoming/outgoing quota problems for QoS>0. 2019-05-31 22:44:34 +01:00
Roger A. Light
f14a47c015 Further attempt 2019-05-29 22:02:40 +01:00
Roger A. Light
18b897e5e3 Attempt to fix 11-message-expiry for travis. 2019-05-29 21:31:27 +01:00
Roger A. Light
7d954fa52e Fix mosquitto_pub -l not handling network failures.
Closes #1152. Thanks to Dustin Sallings.
2019-05-29 18:49:08 +01:00
Roger A. Light
1bafe0ee2e Fix double free on exit in mosquitto_pub.
Closes #1280. Thanks to Lucky Saini.
2019-05-29 18:42:38 +01:00
Roger A. Light
908d1be6e0 Suppress confusing "unknown PUBREL" message. 2019-05-29 17:36:09 +01:00
Roger A. Light
142d07f45a Fix MQTT v5 overlapping subscription behaviour.
Clients now receive message from all matching subscriptions rather than
the first one encountered, which ensures the maximum QoS requirement is
met.
2019-05-29 16:19:18 +01:00
Roger A. Light
de695af8c0 Fix zero length client ids being rejected for MQTT v5 clients.
This was happening when clean start was set to true.
2019-05-29 16:07:45 +01:00
Roger A. Light
e51e40e95c Fix incorrect shared subscription topic of '$shared.' 2019-05-29 15:40:17 +01:00