Commit Graph

73 Commits (03dac10d677299b346ad93a8c2f1370abd36fd94)

Author SHA1 Message Date
Roger A. Light 03dac10d67 Fix TLS bridge/lib incorrectly connecting on invalid CA file.
Closes #2130. Thanks to becz.
5 years ago
Roger A. Light ce31269e05 Update changelog, bump version, bump copyright year. 7 years ago
Roger A. Light f4e24f9524 Use higher resolution timer for random client id generation. 7 years ago
Roger A. Light 574fb36ede More utf-8 validation. 8 years ago
Roger A. Light 6a2172f472 Windows fixes. 8 years ago
Roger A. Light c95f24c342 Missing includes. 8 years ago
Roger A. Light 8470ca89b9 Add MOSQ_OPT_SSL_CTX and MOSQ_OPT_SSL_CTX_WITH_DEFAULTS options.
Closes #567 and #715.
8 years ago
Roger A. Light 28dd14fcea Separate out functions from mosquitto.c to aid discoverability. 8 years ago
Roger A. Light 86ced4d98f Add mosquitto_connect_with_flags_callback_set().
This allows a second connect callback to be used that exposes the
MQTT connect flags parameter.

Closes #738, #128.
8 years ago
Roger A. Light 40e6a75709 Use c99 as compiling standard.
Closes: #765.
8 years ago
Roger A. Light 81cb7ab547 Merge branch 'fixes' into develop 8 years ago
Pierre Fersing 254f30cdb1 Fix mosquitto_want_write for TLS sock connecting
Copied logic from mosquitto_loop which was already patched by
39ffd6fa.

Bugs: #648
8 years ago
Roger A. Light 5a267368d7 Merge branch 'master' into develop 8 years ago
Zard1096 5b73897f98 Fix iOS crash issues
Relate to issues #327 and #63.
mosq->sock may be closed before FD_SET(mosq->sock, &writefds) and
FD_ISSET(mosq->sock, &writefds) but after judgement in line 947
if(mosq->sock != INVALID_SOCKET). FD_SET(-1, ...) and FD_ISSET(-1, ...)
would certainly crash.

Signed-off-by: Zard1096 <mr.zardqi@gmail.com>
8 years ago
Roger A. Light e74203de2c Merge branch 'master' into develop 8 years ago
Roger A. Light 6e7d02ba16 Fix for CVE-2017-9868 for Windows. 8 years ago
Roger A. Light 91b308a11d Merge branch 'master' into develop 9 years ago
Roger A. Light 8e4a80a928 [329] Fix potential negative timeout being passed to pselect.
Thanks to Dollars.

Bug: https://github.com/eclipse/mosquitto/issues/329
9 years ago
Teun Lassche 4dc96a2533 Fix #304 Socket leakage
Signed-off-by: Teun Lassche <contact@thlassche.nl>
9 years ago
Roger A. Light 8378fe44cf Update copyrights. 9 years ago
Roger A. Light 1c3988a397 Merge branch 'master' into develop 9 years ago
Roger A. Light a8a5daf06b Check client topic inputs for valid UTF-8. 9 years ago
Roger A. Light e8185ddaa7 [166] Don't cancel external threads.
libmosquitto shouldn't cancel threads it didn't create. This change
allows us to keep track of whether threads were created by the library
or by external code.

Thanks to Josip Ćavar.

Bug: https://github.com/eclipse/mosquitto/issues/166
9 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 26b015908e Default to using MQTT v3.1.1. 10 years ago
Roger A. Light c7d4f4bcff mosq->want_write should be cleared immediately before a call to SSL_write.
This allows clients using mosquitto_want_write() to get accurate results.
10 years ago
Roger A. Light fca9ac84f7 Merge fixes into develop. 10 years ago
Simon Wunderlich c02cdbefdc mosquitto-lib: close socketpair on (re)connect
If the socket pair is still opened on reconnect, close it before
creating it again (just like the state variables). Otherwise, these
sockets are leaked on multiple mosquitto_connect() calls.

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
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 acb95f2f2e Fix potential memory leak in mosquitto_sub_topic_tokenise() 10 years ago
Roger A. Light 9a2eb2038f Drop Windows XP support, misc fixes on Windows. 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
Anmol Sarma 13d869b8df Avoid calls to strlen() when checking for empty strings.
Change-Id: I3de322006623483cbf20218da071a9da5d7b2e2b
Signed-off-by: Anmol Sarma <me@anmolsarma.in>
10 years ago
Roger A. Light 1254fe93e0 [474935] Increment inflight message count correctly.
Don't duplicate the increment when queueing.

Thanks to Joe McIlvain.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=474935
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 c1974e5402 Report error string on connection failure rather than error code. 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.
10 years ago
Roger A. Light 290ea87828 Build fixes for OpenBSD. 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 94ef6ec7bb Big set of function renames. 11 years ago
Roger A. Light a67d43c8d3 Rename message functions. 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 d7e3fdf7f7 Don't check set size on Windows.
socket is an opaque object on Windows, so this check isn't valid.
11 years ago
Roger A. Light 8de6b92e3c Fix calls to mosquitto_connect*_async() not completing. 11 years ago
Roger A. Light 11756d24c8 Change internal funcs _foo_bar() to foo__bar(). 11 years ago