Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
d57b8c5
feat(mosq): Add example with two brokers synced on P2P
david-cermak Dec 11, 2024
6cce87e
fix(mosq): Fix dependency issues moving esp-tls to public deps
david-cermak Dec 19, 2024
cdeab8f
feat(mosq): Add support for on-message callback
david-cermak Dec 19, 2024
3b2c614
feat(mosq): Upgrade to mosquitto v2.0.20
david-cermak Dec 19, 2024
e6fb8aa
bump(mosq): 2.0.18~0 -> 2.0.20~0
david-cermak Dec 19, 2024
840a561
Merge pull request #710 from david-cermak/feat/mosq_p2p_example
david-cermak Dec 19, 2024
5dcc333
fix(mosq): Update API docs adding on-message callback
david-cermak Dec 20, 2024
95294f5
fix(mosq): Add consistency check for api docs and versions
david-cermak Dec 20, 2024
3cd0ed3
fix(mosq): Use sock_utils instead of func stubs
david-cermak Dec 20, 2024
73e523e
bump(mosq): 2.0.20 -> 2.0.20~1
david-cermak Dec 20, 2024
4745fc8
Merge pull request #719 from david-cermak/bump/mosq_2.2.0_1
david-cermak Dec 20, 2024
ade9448
fix(sockutls): Fix potential macro colission including standard headers
david-cermak Dec 20, 2024
0499ed9
bump(sockutls): 0.2.0 -> 0.2.1
david-cermak Dec 20, 2024
b4cb8f8
Merge pull request #720 from david-cermak/fix/sock_utils_define_conflict
david-cermak Dec 20, 2024
5bd82c0
feat(mdns): support zero item when update subtype
zwx1995esp Jan 6, 2025
f12a205
fix(sockutls): Fix gai_strerror() impl to return const string
david-cermak Jan 7, 2025
9ed835b
bump(sockutls): 0.2.1 -> 0.2.2
david-cermak Jan 7, 2025
f3f3e23
Merge pull request #727 from david-cermak/fix/sockutls_gai_error
david-cermak Jan 7, 2025
7c6a309
Merge pull request #726 from zwx1995esp/feature/support_update_zero_i…
david-cermak Jan 7, 2025
9b0ba60
bump(mdns): 1.4.2 -> 1.4.3
david-cermak Jan 8, 2025
4394f84
Merge pull request #728 from david-cermak/bump/mdns_1.4.3
david-cermak Jan 8, 2025
9537721
fix(mdns): Fixed complier warning if MDNS_MAX_SERVICES==0
david-cermak Jan 10, 2025
827ea65
fix(mdns): Allow advertizing service with port==0
david-cermak Jan 10, 2025
68a9e14
fix(mdns): Cleanup includes in mdns.c
david-cermak Jan 10, 2025
907087c
fix(mdns): Move MDNS_NAME_BUF_LEN to public headers
david-cermak Jan 10, 2025
75a8e86
fix(mdns): Fixed potential overflow when allocating txt data
david-cermak Jan 10, 2025
8f8516c
fix(mdns): Fixed incorrect error conversion
david-cermak Jan 10, 2025
24f55ce
fix(mdns): Fixed potential out-of-bound interface error
david-cermak Jan 10, 2025
3d8835c
fix(mdns): Fix AFL test mock per espressif/esp-idf@a5bc08fb55c
david-cermak Jan 15, 2025
9b74256
Merge pull request #730 from david-cermak/fix/mdns_minor
david-cermak Jan 15, 2025
f5be2f4
fix(mdns): Fix potential null derefernce in _mdns_execute_action()
david-cermak Jan 13, 2025
99b54ac
fix(mdns): Fix name mangling not to use strcpy()
david-cermak Jan 13, 2025
e838bf0
fix(mdns): Remove dead store to arg variable shared
david-cermak Jan 13, 2025
196198e
fix(mdns): Fix zero-sized VLA clang-tidy warnings
david-cermak Jan 13, 2025
4ad88e2
feat(mdns): supported removal of subtype when updating service
tanyanquan Jan 13, 2025
93f7721
Merge pull request #732 from david-cermak/fix/mdns_clangtiy_warns
david-cermak Jan 20, 2025
265e38d
Merge pull request #731 from tanyanquan/feat/update_subtype_removal
david-cermak Jan 20, 2025
774bab2
fix(common): Update esp-docs dependencies to fix docs-build job
david-cermak Jan 20, 2025
ae5a8ce
fix(mosq): Run mosquitto version check only on labeled job or push
david-cermak Jan 20, 2025
8f81478
Merge pull request #735 from david-cermak/fix/docs_build
david-cermak Jan 20, 2025
84caca4
bump(mdns): 1.4.3 -> 1.5.0
david-cermak Jan 20, 2025
a83f1b6
Merge pull request #736 from david-cermak/bump/mdns_1.4.4
david-cermak Jan 21, 2025
90d663a
feat(mosq): Add IDF MQTT stress tests to mosquitto CI
david-cermak Dec 20, 2024
dbd164d
fix(mosq): Add a note about stack size
david-cermak Jan 7, 2025
9162de1
fix(mosq): Remove temp modification of IDF files
david-cermak Jan 8, 2025
6d19aab
Merge pull request #721 from david-cermak/feat/mosq_target_tests
david-cermak Jan 21, 2025
4451a8c
fix(mdns): Fix incorrect memory free for mdns browse
gytxxsy Jan 22, 2025
ebec8ef
Merge pull request #740 from gytxxsy/fix/fix_wrong_mem_free_of_mdns_b…
david-cermak Jan 23, 2025
96eae25
bump(mdns): 1.5.0 -> 1.5.1
david-cermak Jan 23, 2025
163029c
Merge pull request #742 from david-cermak/bump/mdns_1.5.1
david-cermak Jan 23, 2025
4eda7d4
fix(modem): Fix deprecated download action
david-cermak Jan 23, 2025
bd23c23
fix(mdns): Fix _mdns_append_fqdn excessive stack usage
andrew-lifx Jan 24, 2025
813331f
Merge pull request #743 from david-cermak/fix/modem_ci
david-cermak Jan 24, 2025
27435b7
feat(asio): Drop esp/asio patches in favor of sock-utils
david-cermak Dec 18, 2024
6f7c52c
fix(asio): Add tests for IDF-v5.4
david-cermak Dec 18, 2024
9bdd429
feat(asio): Upgrade asio to 1.32
david-cermak Dec 18, 2024
5db32cc
fix(asio): Make asio enable if_nametoindex to fix linking
david-cermak Dec 18, 2024
76aaea0
fix(asio): Fix chat example to print only the message body
david-cermak Jan 24, 2025
ac6a388
bump(asio): 1.28.0 -> 1.32.0
david-cermak Jan 24, 2025
7dc87d2
Merge pull request #717 from david-cermak/feat/asio_sync_upstream
david-cermak Jan 24, 2025
72ba244
bump(asio): Publish 1.32.0 to component manager
david-cermak Jan 24, 2025
b167aa3
Merge pull request #747 from david-cermak/fix/publish_asio_1.32
david-cermak Jan 24, 2025
eeeb900
fix(websocket): propagate error type
johanstokking Nov 12, 2024
9046af8
fix(websocket): Fix pytest to verify client correctly
david-cermak Jan 27, 2025
d4a004b
Merge pull request #694 from johanstokking/fix/websocket-esp-tls-errors
david-cermak Jan 27, 2025
2e7d240
Merge pull request #744 from andrew-lifx/fix/mdns_append_fqdn
david-cermak Jan 28, 2025
e7273c4
fix(mdns): Fix potential NULL deref when sending sub-buy
david-cermak Jan 24, 2025
84c47c3
bump(mdns): 1.5.1 -> 1.5.2
david-cermak Jan 28, 2025
a3c2bbe
Merge pull request #748 from david-cermak/fix/mdns_coverity
david-cermak Jan 28, 2025
55385ec
feat(websocket): Support DS peripheral for mutual TLS
johanstokking Jan 28, 2025
44d476f
docs(websocket): fix minor readability issues
johanstokking Jan 28, 2025
e069ae7
Merge pull request #520 from johanstokking/feature/websocket/client_d…
david-cermak Jan 28, 2025
42674b4
fix(websocket): wait for task on destroy
johanstokking Jan 28, 2025
b57979d
Merge pull request #751 from johanstokking/fix/await-task-on-destroy
david-cermak Jan 29, 2025
7740b59
Merge pull request #749 from david-cermak/fix/ws_client_test
david-cermak Jan 30, 2025
3986611
bump(websocket): 1.3.0 -> 1.4.0
david-cermak Jan 30, 2025
85a8dac
Merge pull request #750 from david-cermak/bump/ws_client
david-cermak Jan 30, 2025
87f835a
fix(mosq): Run IDF build test only on master or labeled PRs
david-cermak Jan 31, 2025
1c6580e
Merge pull request #753 from david-cermak/fix/ci_mosq
david-cermak Feb 3, 2025
cd07228
fix(mdns): Fix responder to ignore only invalid queries
david-cermak Feb 4, 2025
64d818b
bump(mdns): 1.5.2 -> 1.5.3
david-cermak Feb 7, 2025
936e43f
Merge pull request #758 from david-cermak/fix/mdns_ignore_only_invali…
david-cermak Feb 7, 2025
443c344
feat(lws): Add initial support libwebsockets component
glmfe Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/asio__build-target-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Build
strategy:
matrix:
idf_ver: ["latest", "release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3"]
idf_ver: ["latest", "release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4"]
idf_target: ["esp32", "esp32s2"]
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
name: Target tests
strategy:
matrix:
idf_ver: ["latest", "release-v5.0", "release-v5.2", "release-v5.3"]
idf_ver: ["latest", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4"]
idf_target: ["esp32"]
example: ["asio_chat", "tcp_echo_server", "udp_echo_server", "ssl_client_server"]
needs: build_asio
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/lws_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: "lws: build-tests"

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, labeled]

jobs:
build_lws:
if: contains(github.event.pull_request.labels.*.name, 'lws') || github.event_name == 'push'
name: Libwebsockets build
strategy:
matrix:
idf_ver: ["latest", "release-v5.4", "release-v5.3", "release-v5.2"]
test: [ { app: example, path: "examples/client" }]
runs-on: ubuntu-22.04
container: espressif/idf:${{ matrix.idf_ver }}
env:
TEST_DIR: components/libwebsockets/${{ matrix.test.path }}
steps:
- name: Checkout esp-protocols
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }}
shell: bash
run: |
. ${IDF_PATH}/export.sh
python -m pip install idf-build-apps
python ./ci/build_apps.py ${TEST_DIR}
cd ${TEST_DIR}
for dir in `ls -d build_esp32_*`; do
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh `pwd`/$dir
zip -qur artifacts.zip $dir
done
- uses: actions/upload-artifact@v4
with:
name: lws_target_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
path: ${{ env.TEST_DIR }}/artifacts.zip
if-no-files-found: error

run-target-lws:
# Skip running on forks since it won't have access to secrets
if: |
github.repository == 'espressif/esp-protocols' &&
( contains(github.event.pull_request.labels.*.name, 'lws') || github.event_name == 'push' )
name: Target test
needs: build_lws
strategy:
fail-fast: false
matrix:
idf_ver: ["latest", "release-v5.4", "release-v5.3", "release-v5.2"]
idf_target: ["esp32"]
test: [ { app: example, path: "examples/client" }]
runs-on:
- self-hosted
- ESP32-ETHERNET-KIT
env:
TEST_DIR: components/libwebsockets/${{ matrix.test.path }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: lws_target_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
path: ${{ env.TEST_DIR }}/ci/
- name: Install Python packages
env:
PIP_EXTRA_INDEX_URL: "https://www.piwheels.org/simple"
run: |
pip install --only-binary cryptography --extra-index-url https://dl.espressif.com/pypi/ -r $GITHUB_WORKSPACE/ci/requirements.txt
- name: Run Example Test on target
working-directory: ${{ env.TEST_DIR }}
run: |
unzip ci/artifacts.zip -d ci
for dir in `ls -d ci/build_*`; do
rm -rf build sdkconfig.defaults
mv $dir build
python -m pytest --log-cli-level DEBUG --junit-xml=./results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=${{ matrix.idf_target }}
done
- uses: actions/upload-artifact@v4
if: always()
with:
name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml
path: components/libwebsockets/${{ matrix.test.path }}/*.xml
4 changes: 2 additions & 2 deletions .github/workflows/modem__target-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
idf.py set-target ${{ matrix.idf_target }}
idf.py build
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh ${GITHUB_WORKSPACE}/${TEST_DIR}/build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: modem_target_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.test.app }}
path: ${{ env.TEST_DIR }}/build
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: modem_target_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.test.app }}
path: ${{ env.TEST_DIR }}/build
Expand Down
115 changes: 111 additions & 4 deletions .github/workflows/mosq__build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
runs-on: ubuntu-22.04
container: espressif/idf:${{ matrix.idf_ver }}
env:
TEST_DIR: components/mosquitto/examples/broker
TEST_DIR: components/mosquitto/examples
TARGET_TEST: broker
TARGET_TEST_DIR: build_esp32_default
steps:
- name: Checkout esp-protocols
Expand All @@ -29,14 +30,15 @@ jobs:
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager idf-build-apps --upgrade
python ci/build_apps.py ${TEST_DIR}
cd ${TEST_DIR}
python ci/build_apps.py -c ${TEST_DIR} -m components/mosquitto/.build-test-rules.yml
# upload only the target test artifacts
cd ${TEST_DIR}/${TARGET_TEST}
${GITHUB_WORKSPACE}/ci/clean_build_artifacts.sh `pwd`/${TARGET_TEST_DIR}
zip -qur artifacts.zip ${TARGET_TEST_DIR}
- uses: actions/upload-artifact@v4
with:
name: mosq_target_esp32_${{ matrix.idf_ver }}
path: ${{ env.TEST_DIR }}/artifacts.zip
path: ${{ env.TEST_DIR }}/${{ env.TARGET_TEST }}/artifacts.zip
if-no-files-found: error

test_mosq:
Expand Down Expand Up @@ -71,3 +73,108 @@ jobs:
mv $dir build
python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32
done

check_consistency:
if: contains(github.event.pull_request.labels.*.name, 'mosquitto') || github.event_name == 'push'
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"

build_idf_tests_with_mosq:
if: |
github.repository == 'espressif/esp-protocols' &&
( contains(github.event.pull_request.labels.*.name, 'mosquitto') || github.event_name == 'push' )
name: Build IDF tests
strategy:
matrix:
idf_ver: ["latest"]
idf_target: ["esp32"]
test: [ { app: publish, path: "tools/test_apps/protocols/mqtt/publish_connect_test" }]
runs-on: ubuntu-20.04
container: espressif/idf:${{ matrix.idf_ver }}
env:
TARGET_TEST_DIR: build_esp32_local_broker
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
shell: bash
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager idf-build-apps --upgrade
export MOSQUITTO_PATH=`pwd`/components/mosquitto
# to use the actual version of mosquitto
sed -i '/espressif\/mosquitto:/a \ \ \ \ override_path: "${MOSQUITTO_PATH}"' ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
cd ${IDF_PATH}/${{matrix.test.path}}
idf-build-apps find --config sdkconfig.ci.local_broker -vv --target ${{ matrix.idf_target }} --build-dir=${TARGET_TEST_DIR}
idf-build-apps build --config sdkconfig.ci.local_broker -vv --target ${{ matrix.idf_target }} --build-dir=${TARGET_TEST_DIR}
${GITHUB_WORKSPACE}/ci/clean_build_artifacts.sh `pwd`/${TARGET_TEST_DIR}
# to replace mqtt test configs with specific mosquitto markers
python ${MOSQUITTO_PATH}/test/replace_decorators.py pytest_mqtt_publish_app.py ${TARGET_TEST_DIR}/pytest_mosquitto.py
zip -qur ${GITHUB_WORKSPACE}/artifacts.zip ${TARGET_TEST_DIR}
- uses: actions/upload-artifact@v4
with:
name: mosq_publish_esp32_${{ matrix.idf_ver }}
path: artifacts.zip
if-no-files-found: error

test_idf_ci_with_mosq:
# Skip running on forks since it won't have access to secrets
if: |
github.repository == 'espressif/esp-protocols' &&
( contains(github.event.pull_request.labels.*.name, 'mosquitto') || github.event_name == 'push' )
name: Mosquitto IDF target tests
needs: build_idf_tests_with_mosq
strategy:
matrix:
idf_ver: ["latest"]
runs-on:
- self-hosted
- ESP32-ETHERNET-KIT
env:
TEST_DIR: examples
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: mosq_publish_esp32_${{ matrix.idf_ver }}
path: ${{ env.TEST_DIR }}/ci/
- name: Run Test
working-directory: ${{ env.TEST_DIR }}
run: |
python -m pip install pytest-embedded-serial-esp pytest-embedded-idf pytest-rerunfailures pytest-timeout pytest-ignore-test-results "paho-mqtt<2"
unzip ci/artifacts.zip -d ci
for dir in `ls -d ci/build_*`; do
rm -rf build sdkconfig.defaults
mv $dir build
mv build/*.py .
# Run only "test_mosquitto" marked tests
python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32 -m test_mosquitto
done
1 change: 1 addition & 0 deletions .github/workflows/publish-docs-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,6 @@ jobs:
components/mbedtls_cxx;
components/mosquitto;
components/sock_utils;
components/libwebsockets;
namespace: "espressif"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[submodule "components/asio/asio"]
path = components/asio/asio
url = https://github.com/espressif/asio
url = https://github.com/chriskohlhoff/asio
[submodule "components/mosquitto/mosquitto"]
path = components/mosquitto/mosquitto
url = https://github.com/eclipse/mosquitto
[submodule "components/libwebsockets/libwebsockets"]
path = components/libwebsockets/libwebsockets
url = https://github.com/warmcat/libwebsockets.git
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ repos:
- repo: local
hooks:
- id: commit message scopes
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp, tls_cxx, mosq, sockutls"
entry: '\A(?!(feat|fix|ci|bump|test|docs|chore)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|tls_cxx|mosq|sockutls)\)\:)'
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp, tls_cxx, mosq, sockutls, lws"
entry: '\A(?!(feat|fix|ci|bump|test|docs|chore)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|tls_cxx|mosq|sockutls|lws)\)\:)'
language: pygrep
args: [--multiline]
stages: [commit-msg]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ Please refer to instructions in [ESP-IDF](https://github.com/espressif/esp-idf)
### Socket helpers (sock-utils)

* Brief introduction [README](components/sock_utils/README.md)

### libwebsockets

* Brief introduction [README](components/libwebsockets/README.md)
1 change: 1 addition & 0 deletions ci/check_copyright_ignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
components/mosquitto/examples/serverless_mqtt/components/libjuice/port/juice_random.c
3 changes: 2 additions & 1 deletion components/asio/.cz.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
commitizen:
bump_message: 'bump(asio): $current_version -> $new_version'
pre_bump_hooks: python ../../ci/changelog.py asio
tag_format: asio-v$version
version: 1.28.0~0
version: 1.32.0
version_files:
- idf_component.yml
21 changes: 21 additions & 0 deletions components/asio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## [1.32.0](https://github.com/espressif/esp-protocols/commits/asio-v1.32.0)

### Features

- Upgrade asio to 1.32 ([9bdd429c](https://github.com/espressif/esp-protocols/commit/9bdd429c))
- Drop esp/asio patches in favor of sock-utils ([27435b7f](https://github.com/espressif/esp-protocols/commit/27435b7f))

### Bug Fixes

- Fix chat example to print only the message body ([76aaea08](https://github.com/espressif/esp-protocols/commit/76aaea08))
- Make asio enable if_nametoindex to fix linking ([5db32cce](https://github.com/espressif/esp-protocols/commit/5db32cce))
- Re-applie refs to common comps idf_component.yml ([9fe44a45](https://github.com/espressif/esp-protocols/commit/9fe44a45))
- Reference common component from IDF ([74fc228c](https://github.com/espressif/esp-protocols/commit/74fc228c))
- Revert referencing protocol_examples_common from IDF ([f9e0281a](https://github.com/espressif/esp-protocols/commit/f9e0281a))
- reference protocol_examples_common from IDF ([09abb18b](https://github.com/espressif/esp-protocols/commit/09abb18b))
- specify override_path in example manifest files ([1d8923cf](https://github.com/espressif/esp-protocols/commit/1d8923cf))

### Updated

- docs(asio): Updates asio docs ([ce9337d3](https://github.com/espressif/esp-protocols/commit/ce9337d3))

## [1.28.2~0](https://github.com/espressif/esp-protocols/commits/asio-1.28.2_0)

### Bug Fixes
Expand Down
7 changes: 4 additions & 3 deletions components/asio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ if(NOT CONFIG_LWIP_IPV6 AND NOT CMAKE_BUILD_EARLY_EXPANSION)
return()
endif()

set(asio_sources "asio/asio/src/asio.cpp")
set(asio_requires lwip)
set(asio_sources "asio/asio/src/asio.cpp" "port/src/asio_stub.cpp")
set(asio_requires lwip sock_utils)

if(CONFIG_ASIO_SSL_SUPPORT)
list(APPEND asio_sources
Expand All @@ -18,7 +18,7 @@ if(CONFIG_ASIO_SSL_SUPPORT)
endif()

idf_component_register(SRCS ${asio_sources}
INCLUDE_DIRS "asio/asio/include" "port/include"
INCLUDE_DIRS "port/include" "asio/asio/include"
PRIV_INCLUDE_DIRS ${asio_priv_includes}
PRIV_REQUIRES ${asio_requires})

Expand All @@ -30,6 +30,7 @@ target_compile_definitions(${COMPONENT_LIB} PUBLIC SA_RESTART=0x01
ASIO_STANDALONE
ASIO_HAS_PTHREADS
OPENSSL_NO_ENGINE
ASIO_DETAIL_IMPL_POSIX_EVENT_IPP # this replaces asio's posix_event constructor
)

if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)
Expand Down
9 changes: 9 additions & 0 deletions components/asio/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
menu "ESP-ASIO"
visible if LWIP_IPV6

config ASIO_IS_ENABLED
# Invisible option that is enabled if ASIO is added to the IDF components.
# This is used to "select" LWIP_NETIF_API option
# which enables if_indextoname() and if_nametoindex() functions
# (these are optionally used in asio)
bool
default "y"
select LWIP_NETIF_API

config ASIO_SSL_SUPPORT
bool "Enable SSL/TLS support of ASIO"
default n
Expand Down
2 changes: 1 addition & 1 deletion components/asio/asio
Submodule asio updated 1562 files
2 changes: 1 addition & 1 deletion components/asio/examples/asio_chat/main/server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class chat_session
asio::buffer(read_msg_.body(), read_msg_.body_length()),
[this, self](std::error_code ec, std::size_t /*length*/) {
if (!ec) {
ESP_LOGD("asio-chat:", "%s", read_msg_.body());
ESP_LOGD("asio-chat", "%.*s", read_msg_.body_length(), read_msg_.body());
room_.deliver(read_msg_);
do_read_header();
} else {
Expand Down
Loading