From 0460e53696449931d93564ecd63efa109e5f980a Mon Sep 17 00:00:00 2001 From: Damir Nedzibovic Date: Mon, 2 Dec 2024 13:46:31 +0100 Subject: [PATCH] TEL-6243 Fix initialization of test suite. --- src/include/test/switch_test.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/include/test/switch_test.h b/src/include/test/switch_test.h index db5f4f7a7de..a57ecd36e88 100644 --- a/src/include/test/switch_test.h +++ b/src/include/test/switch_test.h @@ -260,7 +260,10 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char switch_time_t fst_time_start = 0; \ switch_timer_t fst_timer = { 0 }; \ switch_memory_pool_t *fst_pool = NULL; \ + switch_memory_pool_t *telnyx_pool = NULL; \ int fst_timer_started = 0; \ + switch_core_new_memory_pool(&telnyx_pool); \ + switch_telnyx_init(telnyx_pool); \ fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \ if (fst_core) { \ fst_init_core_and_modload(NULL, NULL, 0, 0); /* shuts up compiler */ \ @@ -288,7 +291,10 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char switch_time_t fst_time_start = 0; \ switch_timer_t fst_timer = { 0 }; \ switch_memory_pool_t *fst_pool = NULL; \ + switch_memory_pool_t *telnyx_pool = NULL; \ int fst_timer_started = 0; \ + switch_core_new_memory_pool(&telnyx_pool); \ + switch_telnyx_init(telnyx_pool); \ fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \ if (fst_init_core_and_modload(confdir, confdir, 0, flags | SCF_LOG_DISABLE) == SWITCH_STATUS_SUCCESS) { \ fst_core = 2; \ @@ -309,6 +315,7 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char /* shut up compiler */ \ fst_time_start = 0; \ } \ + switch_core_destroy_memory_pool(&telnyx_pool); \ } \ FCT_END() @@ -325,7 +332,10 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char switch_time_t fst_time_start = 0; \ switch_timer_t fst_timer = { 0 }; \ switch_memory_pool_t *fst_pool = NULL; \ + switch_memory_pool_t *telnyx_pool = NULL; \ int fst_timer_started = 0; \ + switch_core_new_memory_pool(&telnyx_pool); \ + switch_telnyx_init(telnyx_pool); \ fst_getenv_default("FST_SUPPRESS_UNUSED_STATIC_WARNING", NULL, SWITCH_FALSE); \ if (fst_init_core_and_modload(confdir, NULL, 1, 0 | SCF_LOG_DISABLE) == SWITCH_STATUS_SUCCESS) { /* minimal load */ \ fst_core = 1; \