Commit Graph

156 Commits (c5fe1fc36bd9c42037b144e7daca44330c37b37b)

Author SHA1 Message Date
Roger A. Light 00491da031 [485143] Fix detection of broken connections on Windows.
Thanks to Pierre-Yves Boisbunon.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=485143
10 years ago
Roger A. Light 2549919413 Fix support for libwebsockets 1.22. 10 years ago
Roger A. Light 7aa653c42f Add support for libwebsockets 1.6. 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 011de7ed19 Fix excessive calls to message retry check. 10 years ago
Roger A. Light 0c0961f6a4 [477571] Fix socket leak with bridges.
Don't leak sockets when an outgoing bridge connection with multiple
addresses is rejected.

Thanks to Johnny Egeland.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=477571
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 e0037b348f [465438] Fix incorrect behaviour for autosave_interval.
Thanks to Jaime Yu.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=465438
10 years ago
Roger A. Light dc5abcac95 [470660] Handle fragmented TLS packets without a delay.
Thanks to Martin Rauscher.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=470660
10 years ago
Roger A. Light cdbe62c2bb Outgoing messages with QoS>0 are no longer retried after a timeout.
This change in behaviour can be justified by considering when the
timeout may have occurred.

* If a connection is unreliable and has dropped, but without one end
  noticing, the messages will be retried on reconnection. Sending
  additional PUBLISH or PUBREL would not have changed anything.

* If a client is overloaded/unable to respond/has a slow connection then
  sending additional PUBLISH or PUBREL would not help the client catch
  up. Once the backlog has cleared the client will respond. If it is not
  able to catch up, sending additional duplicates would not help either.
11 years ago
Roger A. Light 4195fde70b Last raft of renames for the moment. 11 years ago
Roger A. Light 21946ace6c mosquitto__log_printf -> log__printf 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 8049c4b7f8 Simplify code around SYS statistics gathering. 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 cc7beb62a5 [465384] Fix crash on Windows when using bridges.
Thanks to Stefan Rosskopf.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=465384
11 years ago
Roger A. Light 11756d24c8 Change internal funcs _foo_bar() to foo__bar(). 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 502c3e7563 [461619] Disconnect idle websockets clients.
Websockets clients are now periodically disconnected if they have not
maintained their keepalive timer.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=461619
11 years ago
Roger A. Light 626857b20a Close and reopen log_dest file on HUP. 11 years ago
Roger A. Light 34176359c9 [452913] Prevent dereferencing of NULL string.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=452913
11 years ago
Roger A. Light b52e3311d2 Disconnect websockets clients properly.
context->state was being overwritten when websockets clients
attempted to disconnect, leaving them in limbo. This has been fixed.

Thanks to FeelyChau.
11 years ago
Roger A. Light f8f794c531 Allow expiring clients to be cleaned up. 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 fc1e514ad4 Add log_facility for non-Windows OSs. 11 years ago
Roger A. Light 052c2d7766 Fix for Windows. 11 years ago
Roger A. Light 041f60c03e Make bridge connections non-blocking for TLS connections. 11 years ago
Roger A. Light a1f18323d1 Make bridge connections non-blocking for non-TLS connections. 11 years ago
Roger A. Light 372b64a290 More "client has disconnected but is not freed" protections. 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 7b1ee68ef1 Remove compilation warnings for various configurations. 11 years ago
Roger A. Light f9951595c8 Fix missing headers. 11 years ago
Roger A. Light 1fdc4ceee6 Check expiration every hour regardless of the duration. 11 years ago
Roger A. Light 76724c790e Disconnect expired clients correctly. 11 years ago
Roger A. Light 950db12c74 Don't free local bridge clients on disconnect. 11 years ago
Roger A. Light 8b2effcc36 Don't check for POLLERR or POLLNVAL.
Errors will be caught when trying to read anyway, and doing these checks
here means that sockets may be closed prematurely.
11 years ago
Roger A. Light 0ff0cfb3d3 Need to include bridges here. 11 years ago
Roger A. Light 95a4ec431d Don't try to disconnect twice. 11 years ago
Roger A. Light bb1a69b7d7 Disconnect clients consistently. 11 years ago
Roger A. Light 13f94f3511 More reconnect fixes. 11 years ago
Roger A. Light 864f1f0d23 Initialise variable. 11 years ago
Roger A. Light d75903b0ae Fix reconnect support for websockets. 11 years ago
Roger A. Light bdb3e74100 More memory fixes. 11 years ago
Roger A. Light cc33a6e5af Do proper cleanup, including websockets. 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 1148cdae23 Loop fix. 12 years ago
Roger A. Light e8f07d706d Per-listener processing of websockets contexts. 12 years ago
Roger A. Light 9ea161f90e Return success on libwebsocket_write==0. 12 years ago
Roger A. Light 4bb7a45b71 Crude, hard coded websockets support. No TLS. 12 years ago
Roger Light 0364bd1be7 Initial contribution. 12 years ago