summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2017-07-17 09:03:38 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-07-17 09:03:38 -0500
commit1108da4f95c8ef524681a68323959d66dfcb527f (patch)
treea424abdea2e411edd366ce98bd52f0e4b0d7b549
parentfa27fe9a32c6caaf466183bc93c6699b4fd1920d (diff)
parent3858d99b735dd45239984d6ff8eedaaa2beb45f6 (diff)
Merge "app_confbridge: Make sure name recordings are always removed from the filesystem" into 13
-rw-r--r--apps/app_confbridge.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index c06466018..f95aaaf56 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -2137,6 +2137,7 @@ static int conf_rec_name(struct confbridge_user *user, const char *conf_name)
}
if (res == -1) {
+ ast_filedelete(user->name_rec_location, NULL);
user->name_rec_location[0] = '\0';
return -1;
}
@@ -2228,6 +2229,7 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
{
int res = 0, volume_adjustments[2];
int quiet = 0;
+ int async_delete_task_pushed = 0;
char *parse;
const char *b_profile_name = NULL;
const char *u_profile_name = NULL;
@@ -2473,6 +2475,7 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
async_play_sound_file(conference,
conf_get_sound(CONF_SOUND_HAS_LEFT, conference->b_profile.sounds), NULL);
async_delete_name_rec(conference, user.name_rec_location);
+ async_delete_task_pushed = 1;
}
/* play the leave sound */
@@ -2501,6 +2504,9 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
}
confbridge_cleanup:
+ if (!async_delete_task_pushed && !ast_strlen_zero(user.name_rec_location)) {
+ ast_filedelete(user.name_rec_location, NULL);
+ }
ast_bridge_features_cleanup(&user.features);
conf_bridge_profile_destroy(&user.b_profile);
return res;