Commit Graph

2356 Commits

Author SHA1 Message Date
Roger A. Light
db3c016fdd Don't use bridge hash in each client.
Store a DB wide array of bridges. There shouldn't be many of them, so
iterating/searching isn't a problem. Saves 56 bytes in the client
struct.
2014-11-18 23:34:54 +00:00
Roger A. Light
1e64bb171a More memory efficient message store than with hashes.
Also frees messages from the message store after removing...
2014-11-18 19:12:08 +00:00
Roger A. Light
d30d711c3b Improve struct layouts for memory usage. 2014-11-18 07:42:49 +00:00
Roger A. Light
ea8537c048 Remove unused messages from store immediately.
This removes the need for *store_clean*.
2014-11-17 23:46:02 +00:00
Roger A. Light
4374170c40 Use hash for message store to speed up loading.
Comes at the expense of increased memory usage. This could be countered
by using a hash just for loading (increased memory usage during loading,
reduced afterwards) but this approach does allow the immediate removal
of messages from the store.
2014-11-17 22:54:39 +00:00
Roger A. Light
94cd34c86d Add executable permissions. 2014-11-17 22:42:44 +00:00
Roger A. Light
9b9f1c7613 Remove unnecessary callocs. 2014-11-17 22:00:00 +00:00
Roger A. Light
d9e41fe065 Remove dead code. 2014-11-17 21:00:49 +00:00
Roger A. Light
975b127d17 Sanitise password file argv input. 2014-11-17 21:00:33 +00:00
Roger A. Light
07581446e6 Bounds checking for socks domain name inputs. 2014-11-17 20:28:38 +00:00
Roger A. Light
b80402baf0 Only track inflight messages for outgoing messages. 2014-11-17 20:20:50 +00:00
Roger A. Light
41f5d1fd43 Fix parsing of malformed socks urls. 2014-11-17 20:18:53 +00:00
Roger A. Light
166bc2c481 Cleanup client memory on error. 2014-11-16 23:41:06 +00:00
Roger A. Light
66f147749d Fix missing mutex unlock. 2014-11-16 22:36:31 +00:00
Roger A. Light
36f88d902d Fix errors from big code import. 2014-11-12 20:47:16 +00:00
Roger A. Light
fb72bf9c14 Fix incorrect function name in documentation. 2014-11-12 17:52:46 +00:00
Roger A. Light
00d951e6d6 Allow plugins to call mosquitto_log_printf() (Linux only at the moment). 2014-11-03 08:45:56 +00:00
Roger A. Light
fc1e514ad4 Add log_facility for non-Windows OSs. 2014-11-02 21:49:33 +00:00
Roger A. Light
77ffd9f602 Add dependencies to compiling.txt. 2014-10-31 20:19:48 +00:00
Roger A. Light
0a86aee5fb Authentication plugin acl_check function is passed local_username for local bridges. 2014-10-29 22:11:18 +00:00
Roger A. Light
0c3e4e50cc Windows implementation of client config files. 2014-10-26 22:06:54 +00:00
Roger A. Light
ab49b96db1 Windows related fixes. 2014-10-26 21:17:08 +00:00
Roger A. Light
6524115f45 Error if websockets not available. 2014-10-25 00:46:58 +01:00
Roger A. Light
052c2d7766 Fix for Windows. 2014-10-24 22:49:48 +01:00
Roger A. Light
041f60c03e Make bridge connections non-blocking for TLS connections. 2014-10-24 22:39:09 +01:00
Roger A. Light
c92e2f5581 Declare variables before code. 2014-10-24 21:57:33 +01:00
Roger A. Light
a1f18323d1 Make bridge connections non-blocking for non-TLS connections. 2014-10-24 21:28:24 +01:00
Roger A. Light
4ff6a6aa49 Remove duplicate strlen check. 2014-10-23 17:30:09 +01:00
Roger A. Light
66443c14bd Assign to NULL to prevent double free later. 2014-10-21 23:11:31 +01:00
Roger A. Light
7a2dd634cb Protect against possible NULL dereference after unsubscribing. 2014-10-20 18:01:45 +01:00
Roger A. Light
6e0fd9e3ec SRV support is now not compiled in by default. 2014-10-17 22:11:14 +01:00
Roger A. Light
372b64a290 More "client has disconnected but is not freed" protections. 2014-10-17 00:08:10 +01:00
Roger A. Light
c8dffcbfbb Fixes for clientid stealing situation. 2014-10-16 23:48:56 +01:00
Roger A. Light
02be4965ea Don't rearrange leaves here until we are sure we have all the memory allocated. 2014-10-16 23:18:12 +01:00
Roger A. Light
eb01459571 Protect against client->id NULL dereference. 2014-10-16 23:06:47 +01:00
Roger A. Light
065c6356d4 Don't derefence NULLs. 2014-10-16 23:04:26 +01:00
Roger A. Light
7746427b07 Record client subs correctly. 2014-10-16 22:35:05 +01:00
Roger A. Light
5603d6a44d Remove unused struct members. 2014-10-16 21:47:49 +01:00
Roger A. Light
43b1ea8050 Memory leak and id stealing fixes. 2014-10-12 23:58:49 +01:00
Roger A. Light
e3bf10cd9a Change the way that new clients with match client ids are dealt with.
This change means that the connection isn't swapped from new context to
old, which makes dealing with websockets lots easier. It does require
that clients storing a list of their subscriptons.
2014-10-12 11:38:21 +01:00
Roger A. Light
d2dbe16d68 Client structs store sub information to make _subs_clean_session more efficient. 2014-10-09 23:28:16 +01:00
Roger A. Light
070d783c9f Merge 1.3.2-1.3.5 into 1.4. 2014-10-12 11:17:13 +01:00
Roger A. Light
1a47f86648 Typo fix. 2014-10-08 22:48:47 +01:00
Roger A. Light
90b8ceb0df Update libmosquitto man page example. 2014-10-08 22:36:59 +01:00
Roger A. Light
f44b66a331 Bump version number. 2014-10-08 22:29:07 +01:00
Roger A. Light
8cb9b195e5 When using -v and the broker receives a SIGHUP, verbose logging was being disabled. This has been fixed. 2014-10-08 21:38:01 +01:00
Roger A. Light
bad7ec75f0 Temporarily disable ACL checks on subscriptions when using MQTT v3.1.1.
This is due to the complexity of checking wildcard ACLs against wildcard
subscriptions. This does not have a negative impact on security because
checks are still made before a message is sent to a client.  Fixes bug

Thanks to Jan-Piet Mens and Christoph Krey.
2014-10-08 21:16:34 +01:00
Roger A. Light
429c892557 Fix saving persistent database on Windows.
Thanks to Daniel Degasperi.
2014-10-08 20:51:17 +01:00
Roger A. Light
43556537e3 Don't ask for client cert when require_certificate is false. 2014-10-07 23:20:46 +01:00
Roger A. Light
1e87697359 Fix mutex being incorrectly passed by value. Fixes bug #1373785. 2014-10-05 21:56:44 +01:00