Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Mar 6, 2017
2 parents ac98178 + 4c43f4c commit 91b308a
Show file tree
Hide file tree
Showing 49 changed files with 1,080 additions and 148 deletions.
49 changes: 49 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,55 @@ Build:
build and install static versions of the client libraries.


1.4.11 - 20170220
=================

Broker:
- Fix crash when "lazy" type bridge attempts to reconnect. Closes #259.
- maximum_connections now applies to websockets listeners. Closes #271.
- Allow bridges to use TLS with IPv6.
- Don't error on zero length persistence files. Closes #316.
- For http only websockets clients, close files served over http in all cases
when the client disconnects. Closes #354.
- Fix error message when websockets http_dir directory does not exist.
- Improve password utility error message. Closes #379.

Clients:
- Use of --ciphers no longer requires you to also pass --tls-version.
Closes #380.

Client library:
- Clients can now use TLS with IPv6.
- Fix potential socket leakage when reconnecting. Closes #304.
- Fix potential negative timeout being passed to pselect. Closes #329.


1.4.10 - 20160816
=================

Broker:
- Fix TLS operation with websockets listeners and libwebsockts 2.x. Closes
#186.
- Don't disconnect client on HUP before reading the pending data. Closes #7.
- Fix some $SYS messages being incorrectly persisted. Closes #191.
- Support OpenSSL 1.1.0.
- Call fsync after persisting data to ensure it is correctly written. Closes
#189.
- Fix persistence saving of subscription QoS on big-endian machines.
- Fix will retained flag handling on Windows. Closes #222.
- Broker now displays an error if it is unable to open the log file. Closes
#234.

Client library:
- Support OpenSSL 1.1.0.
- Fixed the C++ library not allowing SOCKS support to be used. Closes #198.
- Fix memory leak when verifying a server certificate with a subjectAltName
section. Closes #237.

Build:
- Don't attempt to install docs when WITH_DOCS=no. Closes #184.


1.4.9 - 20160603
================

Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ test : mosquitto

install : mosquitto
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} install; done
ifeq ($(WITH_DOCS),yes)
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} install; done
endif
$(INSTALL) -d ${DESTDIR}/etc/mosquitto
$(INSTALL) -m 644 mosquitto.conf ${DESTDIR}/etc/mosquitto/mosquitto.conf.example
$(INSTALL) -m 644 aclfile.example ${DESTDIR}/etc/mosquitto/aclfile.example
Expand Down
1 change: 1 addition & 0 deletions THANKS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Michael Hekel
Michael Laing
Michael Rushton
Mike Bush
Milan Tucic
Neil Bothwick
Nicholas Humfrey
Nicholas O'Leary
Expand Down
7 changes: 4 additions & 3 deletions client/client_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ int client_opts_set(struct mosquitto *mosq, struct mosq_config *cfg)
return 1;
}
# endif
if(cfg->tls_version && mosquitto_tls_opts_set(mosq, 1, cfg->tls_version, cfg->ciphers)){
if((cfg->tls_version || cfg->ciphers) && mosquitto_tls_opts_set(mosq, 1, cfg->tls_version, cfg->ciphers)){
if(!cfg->quiet) fprintf(stderr, "Error: Problem setting TLS options.\n");
mosquitto_lib_cleanup();
return 1;
Expand Down Expand Up @@ -972,10 +972,11 @@ int client_connect(struct mosquitto *mosq, struct mosq_config *cfg)
}else{
port = 1883;
}
}else{
}else
#endif
{
port = cfg->port;
}
#endif

#ifdef WITH_SRV
if(cfg->use_srv){
Expand Down
4 changes: 1 addition & 3 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* ============================================================ */
#if defined(_MSC_VER) && _MSC_VER < 1900
# define snprintf sprintf_s
# define EPROTO ECONNABORTED
#endif

#ifdef WIN32
Expand All @@ -27,6 +28,3 @@
#define uthash_malloc(sz) mosquitto__malloc(sz)
#define uthash_free(ptr,sz) mosquitto__free(ptr)

#ifndef EPROTO
# define EPROTO ECONNABORTED
#endif
12 changes: 12 additions & 0 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ WITH_STRIP:=no
# Build static libraries
WITH_STATIC_LIBRARIES:=no

# Build with async dns lookup support for bridges (temporary). Requires glibc.
#WITH_ADNS:=yes

# =============================================================================
# End of user configuration
# =============================================================================
Expand Down Expand Up @@ -166,6 +169,10 @@ ifeq ($(UNAME),QNX)
LIB_LIBS:=$(LIB_LIBS) -lsocket
endif

ifeq ($(UNAME),Linux)
BROKER_LIBS:=$(BROKER_LIBS) -lanl
endif

ifeq ($(WITH_WRAP),yes)
BROKER_LIBS:=$(BROKER_LIBS) -lwrap
BROKER_CFLAGS:=$(BROKER_CFLAGS) -DWITH_WRAP
Expand Down Expand Up @@ -250,6 +257,11 @@ ifeq ($(WITH_EC),yes)
BROKER_CFLAGS:=$(BROKER_CFLAGS) -DWITH_EC
endif

ifeq ($(WITH_ADNS),yes)
BROKER_LIBS:=$(BROKER_LIBS) -lanl
BROKER_CFLAGS:=$(BROKER_CFLAGS) -DWITH_ADNS
endif

MAKE_ALL:=mosquitto
ifeq ($(WITH_DOCS),yes)
MAKE_ALL:=$(MAKE_ALL) docs
Expand Down
13 changes: 13 additions & 0 deletions docker/1.4.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM alpine:3.5
MAINTAINER David Audet <[email protected]>

LABEL Description="Eclipse Mosquitto MQTT Broker"

RUN apk --no-cache add mosquitto=1.4.10-r2 && \
mkdir -p /mosquitto/config /mosquitto/data /mosquitto/log && \
cp /etc/mosquitto/mosquitto.conf /mosquitto/config && \
chown -R mosquitto:mosquitto /mosquitto

COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
49 changes: 49 additions & 0 deletions docker/1.4.10/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#Eclipse Mosquitto v1.4.10 Docker Image

##Mount Points

Three mount points have been created in the image to be used for configuration, persistent storage and logs.
```
/mosquitto/config
/mosquitto/data
/mosquitto/log
```


##Configuration

When running the image, the default configuration values are used.
To use a custom configuration file, mount a **local** configuration file to `/mosquitto/config/mosquitto.conf`
```
docker run -it -p 1883:1883 -p 9001:9001 -v <path-to-configuration-file>:/mosquitto/config/mosquitto.conf mosquitto:1.4.10
```

Configuration can be changed to:

* persist data to `/mosquitto/data`
* log to `/mosquitto/log/mosquitto.log`

i.e. add the following to `mosquitto.conf`:
```
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
```

**Note**: If a volume is used, the data will persist between containers.

##Build
Build the image:
```
docker build -t mosquitto:1.4.10 .
```

##Run
Run a container using the new image:
```
docker run -it -p 1883:1883 -p 9001:9001 -v <path-to-configuration-file>:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log mosquitto:1.4.10
```
:boom: if the mosquitto configuration (mosquitto.conf) was modified
to use non-default ports, the docker run command will need to be updated
to expose the ports that have been configured.
5 changes: 5 additions & 0 deletions docker/1.4.10/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/ash

set -e
exec "$@"

13 changes: 13 additions & 0 deletions docker/1.4.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM alpine:3.3
MAINTAINER David Audet <[email protected]>

LABEL Description="Eclipse Mosquitto MQTT Broker"

RUN apk --no-cache add mosquitto=1.4.4-r0 && \
mkdir -p /mosquitto/config /mosquitto/data /mosquitto/log && \
cp /etc/mosquitto/mosquitto.conf /mosquitto/config && \
chown -R mosquitto:mosquitto /mosquitto

COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
49 changes: 49 additions & 0 deletions docker/1.4.4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#Eclipse Mosquitto v1.4.4 Docker Image

##Mount Points

Three mount points have been created in the image to be used for configuration, persistent storage and logs.
```
/mosquitto/config
/mosquitto/data
/mosquitto/log
```


##Configuration

When running the image, the default configuration values are used.
To use a custom configuration file, mount a **local** configuration file to `/mosquitto/config/mosquitto.conf`
```
docker run -it -p 1883:1883 -p 9001:9001 -v <path-to-configuration-file>:/mosquitto/config/mosquitto.conf mosquitto:1.4.4
```

Configuration can be changed to:

* persist data to `/mosquitto/data`
* log to `/mosquitto/log/mosquitto.log`

i.e. add the following to `mosquitto.conf`:
```
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
```

**Note**: If a volume is used, the data will persist between containers.

##Build
Build the image:
```
docker build -t mosquitto:1.4.4 .
```

##Run
Run a container using the new image:
```
docker run -it -p 1883:1883 -p 9001:9001 -v <path-to-configuration-file>:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log mosquitto:1.4.4
```
:boom: if the mosquitto configuration (mosquitto.conf) was modified
to use non-default ports, the docker run command will need to be updated
to expose the ports that have been configured.
5 changes: 5 additions & 0 deletions docker/1.4.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/ash

set -e
exec "$@"

13 changes: 13 additions & 0 deletions docker/1.4.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM alpine:3.4
MAINTAINER David Audet <[email protected]>

LABEL Description="Eclipse Mosquitto MQTT Broker"

RUN apk --no-cache add mosquitto=1.4.8-r2 && \
mkdir -p /mosquitto/config /mosquitto/data /mosquitto/log && \
cp /etc/mosquitto/mosquitto.conf /mosquitto/config && \
chown -R mosquitto:mosquitto /mosquitto

COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
49 changes: 49 additions & 0 deletions docker/1.4.8/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#Eclipse Mosquitto v1.4.8 Docker Image

##Mount Points

Three mount points have been created in the image to be used for configuration, persistent storage and logs.
```
/mosquitto/config
/mosquitto/data
/mosquitto/log
```


##Configuration

When running the image, the default configuration values are used.
To use a custom configuration file, mount a **local** configuration file to `/mosquitto/config/mosquitto.conf`
```
docker run -it -p 1883:1883 -p 9001:9001 -v <path-to-configuration-file>:/mosquitto/config/mosquitto.conf mosquitto:1.4.8
```

Configuration can be changed to:

* persist data to `/mosquitto/data`
* log to `/mosquitto/log/mosquitto.log`

i.e. add the following to `mosquitto.conf`:
```
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
```

**Note**: If a volume is used, the data will persist between containers.

##Build
Build the image:
```
docker build -t mosquitto:1.4.8 .
```

##Run
Run a container using the new image:
```
docker run -it -p 1883:1883 -p 9001:9001 -v <path-to-configuration-file>:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log mosquitto:1.4.8
```
:boom: if the mosquitto configuration (mosquitto.conf) was modified
to use non-default ports, the docker run command will need to be updated
to expose the ports that have been configured.
5 changes: 5 additions & 0 deletions docker/1.4.8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/ash

set -e
exec "$@"

4 changes: 4 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Docker Images

This directory contains the required files to build Mosquitto Docker images.

12 changes: 10 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ if (${WITH_THREADING} STREQUAL ON)
endif (CMAKE_CL_64)
set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include)
else (WIN32)
set (PTHREAD_LIBRARIES pthread)
find_library(LIBPTHREAD pthread)
if (LIBPTHREAD)
set (PTHREAD_LIBRARIES pthread)
else (LIBPTHREAD)
set (PTHREAD_LIBRARIES "")
endif()
set (PTHREAD_INCLUDE_DIR "")
endif (WIN32)
else (${WITH_THREADING} STREQUAL ON)
Expand Down Expand Up @@ -64,7 +69,10 @@ set(C_SRC
set (LIBRARIES ${OPENSSL_LIBRARIES} ${PTHREAD_LIBRARIES})

if (UNIX AND NOT APPLE)
set (LIBRARIES ${LIBRARIES} rt)
find_library(LIBRT rt)
if (LIBRT)
set (LIBRARIES ${LIBRARIES} rt)
endif (LIBRT)
endif (UNIX AND NOT APPLE)

if (WIN32)
Expand Down
4 changes: 0 additions & 4 deletions lib/cpp/mosquittopp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,7 @@ void mosquittopp::user_data_set(void *userdata)

int mosquittopp::socks5_set(const char *host, int port, const char *username, const char *password)
{
#ifdef WITH_SOCKS
return mosquitto_socks5_set(m_mosq, host, port, username, password);
#else
return MOSQ_ERR_NOT_SUPPORTED;
#endif
}


Expand Down
Loading

0 comments on commit 91b308a

Please sign in to comment.