summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/features.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/features.c b/main/features.c
index 755007e24..8d2cffb20 100644
--- a/main/features.c
+++ b/main/features.c
@@ -9130,6 +9130,7 @@ static struct ast_custom_function featuremap_function = {
/*! \internal \brief Clean up resources on Asterisk shutdown */
static void features_shutdown(void)
{
+ ast_cli_unregister_multiple(cli_features, ARRAY_LEN(cli_features));
ast_devstate_prov_del("Park");
ast_custom_function_unregister(&featuremap_function);
ast_custom_function_unregister(&feature_function);
@@ -9142,6 +9143,9 @@ static void features_shutdown(void)
ast_unregister_application(app_bridge);
pthread_cancel(parking_thread);
+ pthread_kill(parking_thread, SIGURG);
+ pthread_join(parking_thread, NULL);
+ ast_context_destroy(NULL, registrar);
ao2_ref(parkinglots, -1);
}