Skip to content

Commit

Permalink
Merge branch 'fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Oct 27, 2021
2 parents 9afeeb1 + 292e969 commit d5970ca
Show file tree
Hide file tree
Showing 189 changed files with 1,047 additions and 467 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0042 NEW)

project(mosquitto)
set (VERSION 2.0.12)
set (VERSION 2.0.13)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")

Expand Down
30 changes: 27 additions & 3 deletions ChangeLog.txt
@@ -1,3 +1,27 @@
2.0.13 - 2021-10-27
===================

Broker:
- Fix `max_keepalive` option not being able to be set to 0.
- Fix LWT messages not being delivered if `per_listener_settings` was set to
true. Closes #2314.
- Various fixes around inflight quota management. Closes #2306.
- Fix problem parsing config files with Windows line endings. Closes #2297.
- Don't send retained messages when a shared subscription is made.
- Fix log being truncated in Windows.
- Fix client id not showing in log on failed connections, where possible.
- Fix broker sending duplicate CONNACK on failed MQTT v5 reauthentication.
Closes #2339.
- Fix mosquitto_plugin.h not including mosquitto_broker.h. Closes #2350.

Client library:
- Initialise sockpairR/W to invalid in `mosquitto_reinitialise()` to avoid
closing invalid sockets in `mosquitto_destroy()` on error. Closes #2326.

Clients:
- Fix date format in mosquitto_sub output. Closes #2353.


2.0.12 - 2021-08-31
===================

Expand Down Expand Up @@ -87,7 +111,7 @@ Broker:
Closes #2207.
- Improve QoS 0 outgoing packet queueing.
- Fix non-reachable bridge blocking the broker on Windows. Closes #2172.
- Fix possible corruption of pollfd array on Windows when bridges were
- Fix possible corruption of pollfd array on Windows when bridges were
reconnecting. Closes #2173.
- Fix QoS 0 messages not being queued when `queue_qos0_messages` was enabled.
Closes #2224.
Expand Down Expand Up @@ -317,7 +341,7 @@ Client library:
Build:
- `install` Makefile target should depend on `all`, not `mosquitto`, to ensure
that man pages are always built. Closes #1989.
- Fixes for lots of minor build warnings highlighted by Visual Studio.
- Fixes for lots of minor build warnings highlighted by Visual Studio.

Apps:
- Disallow control characters in mosquitto_passwd usernames.
Expand Down Expand Up @@ -678,7 +702,7 @@ Broker:
native version. Closes #1684.
- Fix possible assert crash associated with bridge reconnecting when compiled
without epoll support. Closes #1700.

Client library:
- Don't treat an unexpected PUBACK, PUBREL, or PUBCOMP as a fatal error.
Issue #1629.
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Expand Up @@ -70,7 +70,7 @@ clean :
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} clean; done
$(MAKE) -C test clean

reallyclean :
reallyclean :
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} reallyclean; done
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} reallyclean; done
$(MAKE) -C test reallyclean
Expand Down Expand Up @@ -107,7 +107,6 @@ uninstall :

dist : reallyclean
set -e; for d in ${DISTDIRS}; do $(MAKE) -C $${d} dist; done

mkdir -p dist/mosquitto-${VERSION}
cp -r ${DISTFILES} dist/mosquitto-${VERSION}/
cd dist; tar -zcf mosquitto-${VERSION}.tar.gz mosquitto-${VERSION}/
Expand All @@ -125,7 +124,6 @@ coverage :

localdocker : reallyclean
set -e; for d in ${DISTDIRS}; do $(MAKE) -C $${d} dist; done

rm -rf dockertmp/
mkdir -p dockertmp/mosquitto-${VERSION}
cp -r ${DISTFILES} dockertmp/mosquitto-${VERSION}/
Expand Down
18 changes: 18 additions & 0 deletions README-windows.txt
Expand Up @@ -4,6 +4,24 @@ Mosquitto for Windows
Mosquitto for Windows comes in 64-bit and 32-bit flavours. All dependencies are
provided in the installer.

Installing
----------

Running the installer will present the normal type of graphical installer. If
you want to install without starting the graphical part of the installer, you
can do so by running it from a cmd prompt with the `/S` switch:

```
mosquitto-2.0.12-install-windows-x64.exe /S
```

You can override the installation directory with the `/D` switch:

```
mosquitto-2.0.12-install-windows-x64.exe /S /D=:\mosquitto
```


Capabilities
------------

Expand Down
2 changes: 1 addition & 1 deletion THANKS.txt
Expand Up @@ -29,7 +29,7 @@ Dariusz Suchojad
Darren Oliver
David Huang
David Monro
Dirk O. Kaar
Dirk O. Kaar
Dominik Obermaier
Dominik Zajac
Ed Morris
Expand Down
24 changes: 12 additions & 12 deletions about.html
Expand Up @@ -5,30 +5,30 @@
</head>
<body lang="EN-US">
<h2>About This Content</h2>
<p><em>May 8, 2014</em></p>

<p><em>May 8, 2014</em></p>
<h3>License</h3>

<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
indicated below, the Content is provided to you under the terms and conditions of the
Eclipse Public License Version 2.0 ("EPL") and Eclipse Distribution License Version 1.0 ("EDL").
A copy of the EPL is available at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>
and a copy of the EDL is available at
<a href="http:https://www.eclipse.org/org/documents/edl-v10.php">http:https://www.eclipse.org/org/documents/edl-v10.php</a>.
A copy of the EPL is available at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>
and a copy of the EDL is available at
<a href="http:https://www.eclipse.org/org/documents/edl-v10.php">http:https://www.eclipse.org/org/documents/edl-v10.php</a>.
For purposes of the EPL, "Program" will mean the Content.</p>

<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
being redistributed by another party ("Redistributor") and different terms and conditions may
apply to your use of any object code in the Content. Check the Redistributor's license that was
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
and such source code may be obtained at <a href="http:https://www.eclipse.org/">http:https://www.eclipse.org</a>.</p>


<h3>Third Party Content</h3>
<p>The Content includes items that have been sourced from third parties as set out below. If you
did not receive this Content directly from the Eclipse Foundation, the following is provided
for informational purposes only, and you should look to the Redistributor's license for
<p>The Content includes items that have been sourced from third parties as set out below. If you
did not receive this Content directly from the Eclipse Foundation, the following is provided
for informational purposes only, and you should look to the Redistributor's license for
terms and conditions of use.</p>

<h4>libwebsockets 2.4.2</h4>
Expand Down
6 changes: 3 additions & 3 deletions apps/db_dump/db_dump.c
Expand Up @@ -4,12 +4,12 @@ Copyright (c) 2010-2019 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down Expand Up @@ -124,7 +124,7 @@ static int dump__cfg_chunk_process(FILE *db_fd, uint32_t length)
fclose(db_fd);
return rc;
}

if(do_print) printf("DB_CHUNK_CFG:\n");
if(do_print) printf("\tLength: %d\n", length);
if(do_print) printf("\tShutdown: %d\n", chunk.shutdown);
Expand Down
4 changes: 2 additions & 2 deletions apps/db_dump/db_dump.h
Expand Up @@ -6,12 +6,12 @@ Copyright (c) 2010-2019 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down
4 changes: 2 additions & 2 deletions apps/db_dump/print.c
Expand Up @@ -4,12 +4,12 @@ Copyright (c) 2010-2019 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down
17 changes: 17 additions & 0 deletions apps/db_dump/stubs.c
Expand Up @@ -17,6 +17,11 @@ struct mosquitto *context__init(mosq_sock_t sock)
return NULL;
}

void context__add_to_by_id(struct mosquitto *context)
{
UNUSED(context);
}

int db__message_store(const struct mosquitto *source, struct mosquitto_msg_store *stored, uint32_t message_expiry_interval, dbid_t store_id, enum mosquitto_msg_origin origin)
{
UNUSED(source);
Expand Down Expand Up @@ -122,3 +127,15 @@ int keepalive__update(struct mosquitto *context)
UNUSED(context);
return 0;
}

void db__msg_add_to_inflight_stats(struct mosquitto_msg_data *msg_data, struct mosquitto_client_msg *msg)
{
UNUSED(msg_data);
UNUSED(msg);
}

void db__msg_add_to_queued_stats(struct mosquitto_msg_data *msg_data, struct mosquitto_client_msg *msg)
{
UNUSED(msg_data);
UNUSED(msg);
}
2 changes: 1 addition & 1 deletion apps/mosquitto_ctrl/dynsec.c
Expand Up @@ -373,7 +373,7 @@ static void print_default_acl_access(cJSON *j_response)
if(j_acltype == NULL || !cJSON_IsString(j_acltype)
|| j_allow == NULL || !cJSON_IsBool(j_allow)
){

fprintf(stderr, "Error: Invalid response from server.\n");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/mosquitto_ctrl/mosquitto_ctrl.c
Expand Up @@ -74,7 +74,7 @@ int main(int argc, char *argv[])
print_usage();
return 1;
}

/* In built modules */
if(!strcasecmp(argv[0], "dynsec")){
l_ctrl_main = dynsec__main;
Expand Down
4 changes: 2 additions & 2 deletions apps/mosquitto_passwd/get_password.c
Expand Up @@ -4,12 +4,12 @@ Copyright (c) 2012-2020 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down
4 changes: 2 additions & 2 deletions apps/mosquitto_passwd/get_password.h
Expand Up @@ -6,12 +6,12 @@ Copyright (c) 2012-2020 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down
6 changes: 3 additions & 3 deletions apps/mosquitto_passwd/mosquitto_passwd.c
Expand Up @@ -4,12 +4,12 @@ Copyright (c) 2012-2020 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down Expand Up @@ -350,7 +350,7 @@ static int copy_contents(FILE *src, FILE *dest)

rewind(src);
rewind(dest);

#ifdef WIN32
_chsize(fileno(dest), 0);
#else
Expand Down
2 changes: 1 addition & 1 deletion buildtest.py
Expand Up @@ -42,7 +42,7 @@ def run_test(msg, opts):
proc = subprocess.run(args, stdout=subprocess.DEVNULL)
if proc.returncode != 0:
raise RuntimeError("BUILD FAILED: %s" % (' '.join(args)))

def simple_tests():
for bv in build_variants:
for enabled in ["yes", "no"]:
Expand Down
2 changes: 1 addition & 1 deletion client/Makefile
Expand Up @@ -87,5 +87,5 @@ uninstall :

reallyclean : clean

clean :
clean :
-rm -f *.o mosquitto_pub mosquitto_sub mosquitto_rr *.gcda *.gcno
5 changes: 2 additions & 3 deletions client/client_props.c
Expand Up @@ -4,12 +4,12 @@ Copyright (c) 2018-2020 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down Expand Up @@ -109,7 +109,6 @@ int cfg_parse_property(struct mosq_config *cfg, int argc, char *argv[], int *idx
(*idx) += 2;
}


switch(cmd){
case CMD_CONNECT:
proplist = &cfg->connect_props;
Expand Down
6 changes: 3 additions & 3 deletions client/client_shared.c
Expand Up @@ -4,12 +4,12 @@ Copyright (c) 2014-2020 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down Expand Up @@ -992,7 +992,7 @@ int client_config_line_proc(struct mosq_config *cfg, int pub_or_sub, int argc, c
if(cfg->pub_mode != MSGMODE_NONE){
fprintf(stderr, "Error: Only one type of message can be sent at once.\n\n");
return 1;
}else{
}else{
cfg->pub_mode = MSGMODE_STDIN_FILE;
}
#ifdef WITH_SRV
Expand Down
4 changes: 2 additions & 2 deletions client/client_shared.h
Expand Up @@ -4,12 +4,12 @@ Copyright (c) 2014-2020 Roger Light <[email protected]>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http:https://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
Contributors:
Expand Down

0 comments on commit d5970ca

Please sign in to comment.