diff --git a/src/l2cap.c b/src/l2cap.c index b80c9a208..439d23a3a 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -2844,7 +2844,7 @@ static void l2cap_handle_disconnection_complete(hci_con_handle_t handle){ l2cap_ecbm_emit_reconfigure_complete(channel, 0xffff); break; default: - l2cap_emit_simple_event_with_cid(channel, L2CAP_EVENT_ECBM_CHANNEL_OPENED); + l2cap_emit_simple_event_with_cid(channel, L2CAP_EVENT_ECBM_CHANNEL_CLOSED); break; } l2cap_free_channel_entry(channel); diff --git a/test/l2cap-channel/CMakeLists.txt b/test/l2cap-channel/CMakeLists.txt index bc4f6cade..1a87fd5d8 100644 --- a/test/l2cap-channel/CMakeLists.txt +++ b/test/l2cap-channel/CMakeLists.txt @@ -31,6 +31,10 @@ set(SOURCES ../../platform/embedded/btstack_run_loop_embedded.c ) +# Enable ASAN +add_compile_options( -g -fsanitize=address) +add_link_options( -fsanitize=address) + # create static lib add_library(btstack STATIC ${SOURCES}) diff --git a/test/l2cap-channel/Makefile b/test/l2cap-channel/Makefile index 4f088c0a1..fa7de0927 100644 --- a/test/l2cap-channel/Makefile +++ b/test/l2cap-channel/Makefile @@ -75,7 +75,7 @@ build-asan/l2cap_ecbm_test: ${COMMON_OBJ_ASAN} build-asan/l2cap_ecbm_test.o | bu test: all build-asan/l2cap_cbm_test - # build-asan/l2cap_ecbm_test + build-asan/l2cap_ecbm_test coverage: all rm -f build-coverage/*.gcda