Skip to content

Commit 7dc87d2

Browse files
authored
Merge pull request #717 from david-cermak/feat/asio_sync_upstream
[asio]: Drop esp-asio patches in favor of sock-utils
2 parents 813331f + ac6a388 commit 7dc87d2

File tree

15 files changed

+92
-23
lines changed

15 files changed

+92
-23
lines changed

.github/workflows/asio__build-target-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Build
1414
strategy:
1515
matrix:
16-
idf_ver: ["latest", "release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3"]
16+
idf_ver: ["latest", "release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4"]
1717
idf_target: ["esp32", "esp32s2"]
1818
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
1919
runs-on: ubuntu-22.04
@@ -64,7 +64,7 @@ jobs:
6464
name: Target tests
6565
strategy:
6666
matrix:
67-
idf_ver: ["latest", "release-v5.0", "release-v5.2", "release-v5.3"]
67+
idf_ver: ["latest", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4"]
6868
idf_target: ["esp32"]
6969
example: ["asio_chat", "tcp_echo_server", "udp_echo_server", "ssl_client_server"]
7070
needs: build_asio

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "components/asio/asio"]
22
path = components/asio/asio
3-
url = https://github.com/espressif/asio
3+
url = https://github.com/chriskohlhoff/asio
44
[submodule "components/mosquitto/mosquitto"]
55
path = components/mosquitto/mosquitto
66
url = https://github.com/eclipse/mosquitto

components/asio/.cz.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
---
12
commitizen:
23
bump_message: 'bump(asio): $current_version -> $new_version'
34
pre_bump_hooks: python ../../ci/changelog.py asio
45
tag_format: asio-v$version
5-
version: 1.28.0~0
6+
version: 1.32.0
67
version_files:
78
- idf_component.yml

components/asio/CHANGELOG.md

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

3+
## [1.32.0](https://github.com/espressif/esp-protocols/commits/asio-v1.32.0)
4+
5+
### Features
6+
7+
- Upgrade asio to 1.32 ([9bdd429c](https://github.com/espressif/esp-protocols/commit/9bdd429c))
8+
- Drop esp/asio patches in favor of sock-utils ([27435b7f](https://github.com/espressif/esp-protocols/commit/27435b7f))
9+
10+
### Bug Fixes
11+
12+
- Fix chat example to print only the message body ([76aaea08](https://github.com/espressif/esp-protocols/commit/76aaea08))
13+
- Make asio enable if_nametoindex to fix linking ([5db32cce](https://github.com/espressif/esp-protocols/commit/5db32cce))
14+
- Re-applie refs to common comps idf_component.yml ([9fe44a45](https://github.com/espressif/esp-protocols/commit/9fe44a45))
15+
- Reference common component from IDF ([74fc228c](https://github.com/espressif/esp-protocols/commit/74fc228c))
16+
- Revert referencing protocol_examples_common from IDF ([f9e0281a](https://github.com/espressif/esp-protocols/commit/f9e0281a))
17+
- reference protocol_examples_common from IDF ([09abb18b](https://github.com/espressif/esp-protocols/commit/09abb18b))
18+
- specify override_path in example manifest files ([1d8923cf](https://github.com/espressif/esp-protocols/commit/1d8923cf))
19+
20+
### Updated
21+
22+
- docs(asio): Updates asio docs ([ce9337d3](https://github.com/espressif/esp-protocols/commit/ce9337d3))
23+
324
## [1.28.2~0](https://github.com/espressif/esp-protocols/commits/asio-1.28.2_0)
425

526
### Bug Fixes

components/asio/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ if(NOT CONFIG_LWIP_IPV6 AND NOT CMAKE_BUILD_EARLY_EXPANSION)
66
return()
77
endif()
88

9-
set(asio_sources "asio/asio/src/asio.cpp")
10-
set(asio_requires lwip)
9+
set(asio_sources "asio/asio/src/asio.cpp" "port/src/asio_stub.cpp")
10+
set(asio_requires lwip sock_utils)
1111

1212
if(CONFIG_ASIO_SSL_SUPPORT)
1313
list(APPEND asio_sources
@@ -18,7 +18,7 @@ if(CONFIG_ASIO_SSL_SUPPORT)
1818
endif()
1919

2020
idf_component_register(SRCS ${asio_sources}
21-
INCLUDE_DIRS "asio/asio/include" "port/include"
21+
INCLUDE_DIRS "port/include" "asio/asio/include"
2222
PRIV_INCLUDE_DIRS ${asio_priv_includes}
2323
PRIV_REQUIRES ${asio_requires})
2424

@@ -30,6 +30,7 @@ target_compile_definitions(${COMPONENT_LIB} PUBLIC SA_RESTART=0x01
3030
ASIO_STANDALONE
3131
ASIO_HAS_PTHREADS
3232
OPENSSL_NO_ENGINE
33+
ASIO_DETAIL_IMPL_POSIX_EVENT_IPP # this replaces asio's posix_event constructor
3334
)
3435

3536
if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)

components/asio/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
menu "ESP-ASIO"
22
visible if LWIP_IPV6
33

4+
config ASIO_IS_ENABLED
5+
# Invisible option that is enabled if ASIO is added to the IDF components.
6+
# This is used to "select" LWIP_NETIF_API option
7+
# which enables if_indextoname() and if_nametoindex() functions
8+
# (these are optionally used in asio)
9+
bool
10+
default "y"
11+
select LWIP_NETIF_API
12+
413
config ASIO_SSL_SUPPORT
514
bool "Enable SSL/TLS support of ASIO"
615
default n

components/asio/asio

Submodule asio updated 1562 files

components/asio/examples/asio_chat/main/server.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class chat_session
120120
asio::buffer(read_msg_.body(), read_msg_.body_length()),
121121
[this, self](std::error_code ec, std::size_t /*length*/) {
122122
if (!ec) {
123-
ESP_LOGD("asio-chat:", "%s", read_msg_.body());
123+
ESP_LOGD("asio-chat", "%.*s", read_msg_.body_length(), read_msg_.body());
124124
room_.deliver(read_msg_);
125125
do_read_header();
126126
} else {

components/asio/idf_component.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ repository: https://github.com/espressif/esp-protocols.git
77
dependencies:
88
idf:
99
version: ">=5.0"
10+
espressif/sock_utils:
11+
version: "^0.1"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
3+
//
4+
// SPDX-License-Identifier: BSL-1.0
5+
//
6+
#pragma once
7+
8+
#include "sys/socket.h"
9+
#include "socketpair.h"
10+
11+
#include_next "asio/detail/config.hpp"

0 commit comments

Comments
 (0)