From a8dee4b2ffe647f0905dc7083a98559a7da1985c Mon Sep 17 00:00:00 2001 From: Ruslan <80762065+ruslan-voip@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:07:55 +0200 Subject: [PATCH] [mod_conference] file descriptor stays open Solution: don't even start to play file if conference is not running. Co-authored-by: Ruslan Andronov --- src/mod/applications/mod_conference/conference_file.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mod/applications/mod_conference/conference_file.c b/src/mod/applications/mod_conference/conference_file.c index 8f0dc1d8b7..b42599ef6d 100644 --- a/src/mod/applications/mod_conference/conference_file.c +++ b/src/mod/applications/mod_conference/conference_file.c @@ -164,6 +164,11 @@ switch_status_t conference_file_play(conference_obj_t *conference, char *file, u switch_assert(conference != NULL); + if (!conference_utils_test_flag(conference, CFLAG_RUNNING)) { + return SWITCH_STATUS_FALSE; + } + + if (zstr(file)) { return SWITCH_STATUS_NOTFOUND; }