Roger A. Light
f9c9f3d396
Fix incorrect hash usage with duplicate clients.
...
Fix duplicate clients being added to by_id hash before the old client
was removed.
Closes #645 .
7 years ago
Roger A. Light
88765a5e80
Consistent use of config.h across the project.
7 years ago
Tobias Assarsson
cc96485330
Add missing parameters to internal mosquitto_acl_check
...
Signed-off-by: Tobias Assarsson <tobias.assarsson@gmail.com>
7 years ago
Roger A. Light
f4d238be18
Bump copyright years.
8 years ago
Roger A. Light
4d3f5b2b39
Ensure pollfd_index is initialised.
8 years ago
Roger A. Light
c26b852c53
Don't double free when using remote_clientid/username/password.
8 years ago
Roger A. Light
e74203de2c
Merge branch 'master' into develop
8 years ago
Roger A. Light
5246a76f87
[477] Send will messages for connected clients when broker stops.
...
Thanks to mikeS7.
Bug: https://github.com/eclipse/mosquitto/issues/477
8 years ago
Karl Palsson
c6aac741c2
broker: support byte based queueing
...
Limiting queued message depth purely based on message count is hard to
control for memory constrained devices. The size of messages can vary
wildly, from a few bytes, to a few kilobytes. Support a new
max_queued_bytes option, and drop packets when the first limit is
reached. Option defaults to 0 (disabled) by default.
Support also a max_inflight_bytes variable, with similar behaviour.
Fixes (partof) https://github.com/eclipse/mosquitto/issues/100
This pulls up some helper routines for calculating whether to allow
inflight or queuing, resolving some inconsistences in connection
resumption.
Signed-off-by: Karl Palsson <karlp@etactica.com>
9 years ago
Roger A. Light
017db6706f
Rename mosquitto_broker.h -> mosquitto_broker_internal.h
9 years ago
Roger A. Light
8378fe44cf
Update copyrights.
9 years ago
Roger A. Light
1c3988a397
Merge branch 'master' into develop
9 years ago
Pierre Fersing
44f23252a0
Improve performance with lots of queued message
...
Split message queue in two queues: in-flight and queued to avoid the
need to iterate over all messages.
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
10 years ago
Roger A. Light
af995d211d
Fix client library keepalive handling.
...
Fix the case where a message received just before the keepalive timer
expired would cause the client to miss the keepalive timer.
Thanks to Graham Benton.
10 years ago
Roger A. Light
b4fbe904d4
Remove more unnecessary "if(x) mosquitto__free(x)" checks.
10 years ago
Roger A. Light
436d3fac19
Merge branch 'fixes' into develop
...
Conflicts:
CMakeLists.txt
ChangeLog.txt
config.mk
installer/mosquitto.nsi
installer/mosquitto64.nsi
lib/mosquitto.c
lib/mosquitto.h
src/loop.c
10 years ago
Roger A. Light
ed97a3b2f1
Fix potential memory leaks.
10 years ago
Roger Light
e2324ff9bb
Merge remote-tracking branch 'remotes/origin/master' into develop
...
Conflicts:
CMakeLists.txt
ChangeLog.txt
THANKS.txt
appveyor.yml
config.mk
installer/mosquitto-cygwin.nsi
installer/mosquitto.nsi
lib/messages_mosq.c
lib/messages_mosq.h
lib/mosquitto.c
lib/mosquitto.h
lib/net_mosq.c
lib/net_mosq.h
lib/send_client_mosq.c
lib/send_mosq.c
lib/socks_mosq.c
lib/will_mosq.c
src/bridge.c
src/conf.c
src/context.c
src/database.c
src/loop.c
src/mosquitto.c
src/mosquitto_broker.h
src/net.c
src/read_handle.c
src/read_handle_server.c
src/subs.c
10 years ago
Roger A. Light
3f86d316d8
Allow mosquitto__free(NULL).
...
Remove all unnecessary "if(X)" before a call to mosquitto__free.
10 years ago
Roger A. Light
4195fde70b
Last raft of renames for the moment.
11 years ago
Roger A. Light
3c703408f2
More function renaming.
11 years ago
Roger A. Light
94ef6ec7bb
Big set of function renames.
11 years ago
Roger A. Light
1744477cf8
Rename/reorganise packet functions.
11 years ago
Roger A. Light
b598aec385
Sys -> user includes.
11 years ago
Roger A. Light
970ba58da6
Code reorganise.
11 years ago
Roger A. Light
11756d24c8
Change internal funcs _foo_bar() to foo__bar().
11 years ago
Roger A. Light
21b372ed9e
ACLs are now checked before sending a will message.
11 years ago
Roger A. Light
dacee786be
[463000] Use own type to simplify socket handling.
...
Means that SOCKET is used as the socket type everywhere on Windows.
11 years ago
Roger A. Light
2ce4d94282
Fix dereferencing of msg store items.
11 years ago
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.
11 years ago
Roger A. Light
ea8537c048
Remove unused messages from store immediately.
...
This removes the need for *store_clean*.
11 years ago
Roger A. Light
ab49b96db1
Windows related fixes.
11 years ago
Roger A. Light
c92e2f5581
Declare variables before code.
11 years ago
Roger A. Light
d2dbe16d68
Client structs store sub information to make _subs_clean_session more efficient.
11 years ago
Roger A. Light
db9d6b9f3d
Fix potential memory leak from context->current_out_packet.
11 years ago
Roger A. Light
154b2fc264
Must remove memory reference here.
11 years ago
Roger A. Light
dcd469c177
Use own linked list for storing disused contexts for freeing.
...
Seemed to be a problem with getting it to work under a hash and there
isn't really any need for a hash.
11 years ago
Roger A. Light
1fb5a3edc6
Use hash counts to calculate numbers of clients.
11 years ago
Roger A. Light
f9951595c8
Fix missing headers.
11 years ago
Roger A. Light
b937a043e7
Rename remote bridge identifiers to remote_.
11 years ago
Roger A. Light
bb1a69b7d7
Disconnect clients consistently.
11 years ago
Roger A. Light
84619c296d
Fix building for WITH_BRIDGE=no.
11 years ago
Roger A. Light
bdb3e74100
More memory fixes.
11 years ago
Roger A. Light
15efd2d072
Various memory fixes.
11 years ago
Roger A. Light
3577dbf332
Add sock hash earlier to avoid crashes.
11 years ago
Roger A. Light
764b7e0a91
Use hash functions to store client data.
11 years ago
Roger A. Light
7b62bfd7da
Use time() for disconnect_t, CLOCK_MONOTONIC isn't useful over reboots.
11 years ago
Roger A. Light
4430228855
Be consistent about removing listener counts on socket close.
11 years ago
Roger A. Light
6a7f77d2a8
More intelligent client counting.
11 years ago
Roger Light
0364bd1be7
Initial contribution.
12 years ago