manager: fixing unwinding protocom endpoints, on prov_stop. This enables starting and stopping provisioning on a pre started http server

pull/12525/head
kohait00 2023-10-24 00:33:52 +02:00 zatwierdzone przez Laukik Hase
rodzic c2cf88c783
commit 7c8663ffa9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: D6F3208C06086AC8
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -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);