Roger A. Light
8470ca89b9
Add MOSQ_OPT_SSL_CTX and MOSQ_OPT_SSL_CTX_WITH_DEFAULTS options.
...
Closes #567 and #715 .
2018-04-11 16:34:24 +01:00
Roger A. Light
28dd14fcea
Separate out functions from mosquitto.c to aid discoverability.
2018-04-11 15:04:17 +01:00
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 .
2018-04-11 14:06:16 +01:00
Roger A. Light
40e6a75709
Use c99 as compiling standard.
...
Closes : #765 .
2018-04-06 00:33:22 +01:00
Roger A. Light
81cb7ab547
Merge branch 'fixes' into develop
2018-02-13 14:16:47 +00:00
Pierre Fersing
254f30cdb1
Fix mosquitto_want_write for TLS sock connecting
...
Copied logic from mosquitto_loop which was already patched by
39ffd6fa
.
Bugs: #648
2018-01-05 15:39:11 +01:00
Roger A. Light
5a267368d7
Merge branch 'master' into develop
2017-07-19 00:15:42 +01:00
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>
2017-07-16 23:22:13 +01:00
Roger A. Light
e74203de2c
Merge branch 'master' into develop
2017-07-16 22:52:01 +01:00
Roger A. Light
6e7d02ba16
Fix for CVE-2017-9868 for Windows.
2017-06-26 14:53:33 +01:00
Roger A. Light
91b308a11d
Merge branch 'master' into develop
2017-03-06 21:19:53 +00:00
Roger A. Light
8e4a80a928
[329] Fix potential negative timeout being passed to pselect.
...
Thanks to Dollars.
Bug: https://github.com/eclipse/mosquitto/issues/329
2017-02-20 23:48:30 +00:00
Teun Lassche
4dc96a2533
Fix #304 Socket leakage
...
Signed-off-by: Teun Lassche <contact@thlassche.nl>
2017-02-20 23:48:30 +00:00
Roger A. Light
8378fe44cf
Update copyrights.
2016-07-08 09:42:24 +01:00
Roger A. Light
1c3988a397
Merge branch 'master' into develop
2016-06-21 23:33:58 +01:00
Roger A. Light
a8a5daf06b
Check client topic inputs for valid UTF-8.
2016-06-20 22:56:01 +01:00
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
2016-05-18 14:05:08 +01:00
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.
2016-02-28 17:24:43 +00:00
Roger A. Light
26b015908e
Default to using MQTT v3.1.1.
2016-02-05 21:22:42 +00:00
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.
2016-01-13 21:32:01 +00:00
Roger A. Light
fca9ac84f7
Merge fixes into develop.
2016-01-06 21:10:34 +00:00
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>
2015-09-22 17:10:26 +01:00
Roger A. Light
b4fbe904d4
Remove more unnecessary "if(x) mosquitto__free(x)" checks.
2015-09-22 14:42:56 +01:00
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
2015-09-22 14:18:12 +01:00
Roger A. Light
acb95f2f2e
Fix potential memory leak in mosquitto_sub_topic_tokenise()
2015-09-22 14:04:09 +01:00
Roger A. Light
9a2eb2038f
Drop Windows XP support, misc fixes on Windows.
2015-09-22 10:03:57 +01:00
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
2015-09-09 22:02:46 +01:00
Roger A. Light
3f86d316d8
Allow mosquitto__free(NULL).
...
Remove all unnecessary "if(X)" before a call to mosquitto__free.
2015-08-18 14:53:22 +01:00
Anmol Sarma
13d869b8df
Avoid calls to strlen() when checking for empty strings.
...
Change-Id: I3de322006623483cbf20218da071a9da5d7b2e2b
Signed-off-by: Anmol Sarma <me@anmolsarma.in>
2015-08-17 16:00:16 -04:00
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
2015-08-17 20:50:41 +01:00
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
2015-06-25 10:53:24 +01:00
Roger A. Light
c1974e5402
Report error string on connection failure rather than error code.
2015-06-23 22:59:03 +01:00
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.
2015-05-24 11:59:53 +01:00
Roger A. Light
290ea87828
Build fixes for OpenBSD.
2015-05-21 17:15:33 +01:00
Roger A. Light
4195fde70b
Last raft of renames for the moment.
2015-05-18 09:29:22 +01:00
Roger A. Light
21946ace6c
mosquitto__log_printf -> log__printf
2015-05-18 08:53:21 +01:00
Roger A. Light
94ef6ec7bb
Big set of function renames.
2015-05-16 15:24:24 +01:00
Roger A. Light
a67d43c8d3
Rename message functions.
2015-05-16 14:29:54 +01:00
Roger A. Light
1744477cf8
Rename/reorganise packet functions.
2015-05-16 14:16:40 +01:00
Roger A. Light
b598aec385
Sys -> user includes.
2015-04-29 21:37:47 +01:00
Roger A. Light
970ba58da6
Code reorganise.
2015-04-29 21:23:59 +01:00
Roger A. Light
d7e3fdf7f7
Don't check set size on Windows.
...
socket is an opaque object on Windows, so this check isn't valid.
2015-04-29 10:40:19 +01:00
Roger A. Light
8de6b92e3c
Fix calls to mosquitto_connect*_async() not completing.
2015-04-29 10:13:55 +01:00
Roger A. Light
11756d24c8
Change internal funcs _foo_bar() to foo__bar().
2015-04-19 22:10:59 +01:00
Roger A. Light
e5010af4df
[464632] Library: Fix possible crash due to select() call.
...
Fix possibility of select() being called with a socket that is >FD_SETSIZE.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464632
2015-04-19 21:13:54 +01:00
Roger A. Light
22fee31ba4
[464436] Library: Fix outgoing QoS 2 message problem.
...
Inflight message count wasn't being decreased for outgoing messages using
QoS 2, meaning that only up to 20 QoS 2 messages could be sent. This has
been fixed.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464436
2015-04-11 11:32:33 +01:00
Roger A. Light
46ccc2efe9
[463479] Make _mosquitto_mid_generate() thread safe.
...
Thanks to bdwalker.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463479
2015-04-03 07:48:55 +01:00
Roger A. Light
dacee786be
[463000] Use own type to simplify socket handling.
...
Means that SOCKET is used as the socket type everywhere on Windows.
2015-03-29 10:43:08 +01:00
Roger A. Light
0434d1cd9b
[461705] Return -1 on error from mosquitto_socket()
...
Thanks to Mikkel Kirkgaard Nielsen.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=461705
2015-03-27 01:40:41 +00:00
Roger A. Light
2aceb704b5
[463000] Fix reconnect bug on Windows.
...
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463000
2015-03-27 01:24:16 +00:00