From 7c8663ffa99a34c53c5a587d9bfa8ccfac825843 Mon Sep 17 00:00:00 2001 From: kohait00 Date: Tue, 24 Oct 2023 00:33:52 +0200 Subject: [PATCH] manager: fixing unwinding protocom endpoints, on prov_stop. This enables starting and stopping provisioning on a pre started http server --- components/wifi_provisioning/src/manager.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/wifi_provisioning/src/manager.c b/components/wifi_provisioning/src/manager.c index 69ed01e0fc..07022ecbfd 100644 --- a/components/wifi_provisioning/src/manager.c +++ b/components/wifi_provisioning/src/manager.c @@ -558,6 +558,16 @@ static void prov_stop_and_notify(bool is_async) vTaskDelay(cleanup_delay / portTICK_PERIOD_MS); } + protocomm_remove_endpoint(prov_ctx->pc, "prov-ctrl"); + + protocomm_remove_endpoint(prov_ctx->pc, "prov-scan"); + + protocomm_remove_endpoint(prov_ctx->pc, "prov-config"); + + protocomm_unset_security(prov_ctx->pc, "prov-session"); + + protocomm_unset_version(prov_ctx->pc, "proto-ver"); + /* All the extra application added endpoints are also * removed automatically when prov_stop is called */ prov_ctx->mgr_config.scheme.prov_stop(prov_ctx->pc);