Skip to content

Commit 4745fc8

Browse files
authored
Merge pull request #719 from david-cermak/bump/mosq_2.2.0_1
[mosq]: Bump: v2.0.20 -> 2.0.20~1
2 parents 840a561 + 73e523e commit 4745fc8

File tree

11 files changed

+69
-61
lines changed

11 files changed

+69
-61
lines changed

.github/workflows/mosq__build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,30 @@ jobs:
7373
mv $dir build
7474
python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32
7575
done
76+
77+
check_consistency:
78+
name: Checks that API docs and versions are consistent
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
- name: Checks API Docs and versions
83+
run: |
84+
sudo apt-get update
85+
sudo apt-get -y install doxygen
86+
pip install esp-doxybook
87+
cd components/mosquitto
88+
cp api.md api_orig.md
89+
./generate_api_docs.sh
90+
diff -wB api.md api_orig.md
91+
# check version consistency
92+
CONFIG_VERSION=$(grep -Po '(?<=#define VERSION ")[^"]*' port/priv_include/config.h)
93+
CZ_VERSION=$(grep -Po '(?<=version: )[^"]*' .cz.yaml)
94+
COMP_VERSION=$(grep -Po '(?<=version: ")[^"]*' idf_component.yml)
95+
if [ "$CONFIG_VERSION" != "v$CZ_VERSION" ] || [ "$CONFIG_VERSION" != "v$COMP_VERSION" ]; then
96+
echo "Version mismatch detected:"
97+
echo "config.h: $CONFIG_VERSION"
98+
echo ".cz.yaml: $CZ_VERSION"
99+
echo "idf_component.yml: $COMP_VERSION"
100+
exit 1
101+
fi
102+
echo "Versions are consistent: $CONFIG_VERSION"

components/mosquitto/.cz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commitizen:
33
bump_message: 'bump(mosq): $current_version -> $new_version'
44
pre_bump_hooks: python ../../ci/changelog.py mosquitto
55
tag_format: mosq-v$version
6-
version: 2.0.20
6+
version: 2.0.20~1
77
version_files:
88
- idf_component.yml

components/mosquitto/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [2.0.20~1](https://github.com/espressif/esp-protocols/commits/mosq-v2.0.20_1)
4+
5+
### Bug Fixes
6+
7+
- Use sock_utils instead of func stubs ([3cd0ed37](https://github.com/espressif/esp-protocols/commit/3cd0ed37))
8+
- Update API docs adding on-message callback ([5dcc3330](https://github.com/espressif/esp-protocols/commit/5dcc3330))
9+
310
## [2.0.20](https://github.com/espressif/esp-protocols/commits/mosq-v2.0.20)
411

512
### Features

components/mosquitto/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,15 @@ idf_component_register(SRCS ${m_srcs}
7474
port/callbacks.c
7575
port/config.c
7676
port/signals.c
77-
port/ifaddrs.c
7877
port/broker.c
7978
port/files.c
8079
port/net__esp_tls.c
80+
port/sysconf.c
8181
PRIV_INCLUDE_DIRS port/priv_include port/priv_include/sys ${m_dir} ${m_src_dir}
8282
${m_incl_dir} ${m_lib_dir} ${m_deps_dir}
8383
INCLUDE_DIRS ${m_incl_dir} port/include
8484
REQUIRES esp-tls
85-
PRIV_REQUIRES newlib
86-
)
85+
PRIV_REQUIRES newlib sock_utils)
8786

8887
target_compile_definitions(${COMPONENT_LIB} PRIVATE "WITH_BROKER")
8988
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

components/mosquitto/api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
| Type | Name |
1616
| ---: | :--- |
1717
| struct | [**mosq\_broker\_config**](#struct-mosq_broker_config) <br>_Mosquitto configuration structure._ |
18+
| typedef void(\* | [**mosq\_message\_cb\_t**](#typedef-mosq_message_cb_t) <br> |
1819

1920
## Functions
2021

@@ -34,12 +35,20 @@ ESP port of mosquittto supports only the options in this configuration structure
3435

3536
Variables:
3637

38+
- void(\* handle_message_cb <br>On message callback. If configured, user function is called whenever mosquitto processes a message.
39+
3740
- char \* host <br>Address on which the broker is listening for connections
3841

3942
- int port <br>Port number of the broker to listen to
4043

4144
- 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`
4245

46+
### typedef `mosq_message_cb_t`
47+
48+
```c
49+
typedef void(* mosq_message_cb_t) (char *client, char *topic, char *data, int len, int qos, int retain);
50+
```
51+
4352
4453
## Functions Documentation
4554
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
version: "2.0.20~0"
1+
version: "2.0.20~1"
22
url: https://github.com/espressif/esp-protocols/tree/master/components/mosquitto
33
description: The component provides a simple ESP32 port of mosquitto broker
44
dependencies:
55
idf: '>=5.1'
6+
espressif/sock_utils:
7+
version: '^0.2'

components/mosquitto/port/ifaddrs.c

Lines changed: 0 additions & 20 deletions
This file was deleted.

components/mosquitto/port/priv_include/config.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,11 @@
55
*/
66
#pragma once
77
#include <ctype.h>
8+
#include "net/if.h"
89

910
#undef isspace
1011
#define isspace(__c) (__ctype_lookup((int)__c)&_S)
1112

1213
#include_next "config.h"
13-
#define VERSION "v2.0.18~0"
1414

15-
#define _SC_OPEN_MAX_OVERRIDE 4
16-
17-
// used to override syscall for obtaining max open fds
18-
static inline long sysconf(int arg)
19-
{
20-
if (arg == _SC_OPEN_MAX_OVERRIDE) {
21-
return 64;
22-
}
23-
return -1;
24-
}
15+
#define VERSION "v2.0.20~1"

components/mosquitto/port/priv_include/ifaddrs.h

Lines changed: 0 additions & 17 deletions
This file was deleted.

components/mosquitto/port/priv_include/poll.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)