forked from espressif/esp-protocols
Merge pull request #719 from david-cermak/bump/mosq_2.2.0_1
[mosq]: Bump: v2.0.20 -> 2.0.20~1
This commit is contained in:
27
.github/workflows/mosq__build.yml
vendored
27
.github/workflows/mosq__build.yml
vendored
@@ -73,3 +73,30 @@ jobs:
|
|||||||
mv $dir build
|
mv $dir build
|
||||||
python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32
|
python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32
|
||||||
done
|
done
|
||||||
|
|
||||||
|
check_consistency:
|
||||||
|
name: Checks that API docs and versions are consistent
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Checks API Docs and versions
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install doxygen
|
||||||
|
pip install esp-doxybook
|
||||||
|
cd components/mosquitto
|
||||||
|
cp api.md api_orig.md
|
||||||
|
./generate_api_docs.sh
|
||||||
|
diff -wB api.md api_orig.md
|
||||||
|
# check version consistency
|
||||||
|
CONFIG_VERSION=$(grep -Po '(?<=#define VERSION ")[^"]*' port/priv_include/config.h)
|
||||||
|
CZ_VERSION=$(grep -Po '(?<=version: )[^"]*' .cz.yaml)
|
||||||
|
COMP_VERSION=$(grep -Po '(?<=version: ")[^"]*' idf_component.yml)
|
||||||
|
if [ "$CONFIG_VERSION" != "v$CZ_VERSION" ] || [ "$CONFIG_VERSION" != "v$COMP_VERSION" ]; then
|
||||||
|
echo "Version mismatch detected:"
|
||||||
|
echo "config.h: $CONFIG_VERSION"
|
||||||
|
echo ".cz.yaml: $CZ_VERSION"
|
||||||
|
echo "idf_component.yml: $COMP_VERSION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Versions are consistent: $CONFIG_VERSION"
|
||||||
|
@@ -3,6 +3,6 @@ commitizen:
|
|||||||
bump_message: 'bump(mosq): $current_version -> $new_version'
|
bump_message: 'bump(mosq): $current_version -> $new_version'
|
||||||
pre_bump_hooks: python ../../ci/changelog.py mosquitto
|
pre_bump_hooks: python ../../ci/changelog.py mosquitto
|
||||||
tag_format: mosq-v$version
|
tag_format: mosq-v$version
|
||||||
version: 2.0.20
|
version: 2.0.20~1
|
||||||
version_files:
|
version_files:
|
||||||
- idf_component.yml
|
- idf_component.yml
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [2.0.20~1](https://github.com/espressif/esp-protocols/commits/mosq-v2.0.20_1)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Use sock_utils instead of func stubs ([3cd0ed37](https://github.com/espressif/esp-protocols/commit/3cd0ed37))
|
||||||
|
- Update API docs adding on-message callback ([5dcc3330](https://github.com/espressif/esp-protocols/commit/5dcc3330))
|
||||||
|
|
||||||
## [2.0.20](https://github.com/espressif/esp-protocols/commits/mosq-v2.0.20)
|
## [2.0.20](https://github.com/espressif/esp-protocols/commits/mosq-v2.0.20)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
@@ -74,16 +74,15 @@ idf_component_register(SRCS ${m_srcs}
|
|||||||
port/callbacks.c
|
port/callbacks.c
|
||||||
port/config.c
|
port/config.c
|
||||||
port/signals.c
|
port/signals.c
|
||||||
port/ifaddrs.c
|
|
||||||
port/broker.c
|
port/broker.c
|
||||||
port/files.c
|
port/files.c
|
||||||
port/net__esp_tls.c
|
port/net__esp_tls.c
|
||||||
|
port/sysconf.c
|
||||||
PRIV_INCLUDE_DIRS port/priv_include port/priv_include/sys ${m_dir} ${m_src_dir}
|
PRIV_INCLUDE_DIRS port/priv_include port/priv_include/sys ${m_dir} ${m_src_dir}
|
||||||
${m_incl_dir} ${m_lib_dir} ${m_deps_dir}
|
${m_incl_dir} ${m_lib_dir} ${m_deps_dir}
|
||||||
INCLUDE_DIRS ${m_incl_dir} port/include
|
INCLUDE_DIRS ${m_incl_dir} port/include
|
||||||
REQUIRES esp-tls
|
REQUIRES esp-tls
|
||||||
PRIV_REQUIRES newlib
|
PRIV_REQUIRES newlib sock_utils)
|
||||||
)
|
|
||||||
|
|
||||||
target_compile_definitions(${COMPONENT_LIB} PRIVATE "WITH_BROKER")
|
target_compile_definitions(${COMPONENT_LIB} PRIVATE "WITH_BROKER")
|
||||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
| Type | Name |
|
| Type | Name |
|
||||||
| ---: | :--- |
|
| ---: | :--- |
|
||||||
| struct | [**mosq\_broker\_config**](#struct-mosq_broker_config) <br>_Mosquitto configuration structure._ |
|
| struct | [**mosq\_broker\_config**](#struct-mosq_broker_config) <br>_Mosquitto configuration structure._ |
|
||||||
|
| typedef void(\* | [**mosq\_message\_cb\_t**](#typedef-mosq_message_cb_t) <br> |
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
@@ -34,12 +35,20 @@ ESP port of mosquittto supports only the options in this configuration structure
|
|||||||
|
|
||||||
Variables:
|
Variables:
|
||||||
|
|
||||||
|
- void(\* handle_message_cb <br>On message callback. If configured, user function is called whenever mosquitto processes a message.
|
||||||
|
|
||||||
- char \* host <br>Address on which the broker is listening for connections
|
- char \* host <br>Address on which the broker is listening for connections
|
||||||
|
|
||||||
- int port <br>Port number of the broker to listen to
|
- int port <br>Port number of the broker to listen to
|
||||||
|
|
||||||
- esp\_tls\_cfg\_server\_t \* tls_cfg <br>ESP-TLS configuration (if TLS transport used) Please refer to the ESP-TLS official documentation for more details on configuring the TLS options. You can open the respective docs with this idf.py command: `idf.py docs -sp api-reference/protocols/esp_tls.html`
|
- esp\_tls\_cfg\_server\_t \* tls_cfg <br>ESP-TLS configuration (if TLS transport used) Please refer to the ESP-TLS official documentation for more details on configuring the TLS options. You can open the respective docs with this idf.py command: `idf.py docs -sp api-reference/protocols/esp_tls.html`
|
||||||
|
|
||||||
|
### typedef `mosq_message_cb_t`
|
||||||
|
|
||||||
|
```c
|
||||||
|
typedef void(* mosq_message_cb_t) (char *client, char *topic, char *data, int len, int qos, int retain);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Functions Documentation
|
## Functions Documentation
|
||||||
|
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
version: "2.0.20~0"
|
version: "2.0.20~1"
|
||||||
url: https://github.com/espressif/esp-protocols/tree/master/components/mosquitto
|
url: https://github.com/espressif/esp-protocols/tree/master/components/mosquitto
|
||||||
description: The component provides a simple ESP32 port of mosquitto broker
|
description: The component provides a simple ESP32 port of mosquitto broker
|
||||||
dependencies:
|
dependencies:
|
||||||
idf: '>=5.1'
|
idf: '>=5.1'
|
||||||
|
espressif/sock_utils:
|
||||||
|
version: '^0.2'
|
||||||
|
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2024 Roger Light <roger@atchoo.org>
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: EPL-2.0
|
|
||||||
*
|
|
||||||
* SPDX-FileContributor: 2024 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*/
|
|
||||||
#include "ifaddrs.h"
|
|
||||||
|
|
||||||
// Dummy implementation of getifaddrs()
|
|
||||||
// TODO: Implement this if we need to use bind_interface option of listener's config
|
|
||||||
int getifaddrs(struct ifaddrs **ifap)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void freeifaddrs(struct ifaddrs *ifa)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
@@ -5,20 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include "net/if.h"
|
||||||
|
|
||||||
#undef isspace
|
#undef isspace
|
||||||
#define isspace(__c) (__ctype_lookup((int)__c)&_S)
|
#define isspace(__c) (__ctype_lookup((int)__c)&_S)
|
||||||
|
|
||||||
#include_next "config.h"
|
#include_next "config.h"
|
||||||
#define VERSION "v2.0.18~0"
|
|
||||||
|
|
||||||
#define _SC_OPEN_MAX_OVERRIDE 4
|
#define VERSION "v2.0.20~1"
|
||||||
|
|
||||||
// used to override syscall for obtaining max open fds
|
|
||||||
static inline long sysconf(int arg)
|
|
||||||
{
|
|
||||||
if (arg == _SC_OPEN_MAX_OVERRIDE) {
|
|
||||||
return 64;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define gai_strerror(x) "gai_strerror() not supported"
|
|
||||||
|
|
||||||
struct ifaddrs {
|
|
||||||
struct ifaddrs *ifa_next; /* Next item in list */
|
|
||||||
char *ifa_name; /* Name of interface */
|
|
||||||
struct sockaddr *ifa_addr; /* Address of interface */
|
|
||||||
};
|
|
||||||
|
|
||||||
int getifaddrs(struct ifaddrs **ifap);
|
|
||||||
void freeifaddrs(struct ifaddrs *ifa);
|
|
@@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include_next "sys/poll.h"
|
|
18
components/mosquitto/port/sysconf.c
Normal file
18
components/mosquitto/port/sysconf.c
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#define _SC_OPEN_MAX_OVERRIDE 4
|
||||||
|
|
||||||
|
// used to override syscall for obtaining max open fds
|
||||||
|
long sysconf(int arg)
|
||||||
|
{
|
||||||
|
if (arg == _SC_OPEN_MAX_OVERRIDE) {
|
||||||
|
return 64;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
Reference in New Issue
Block a user