From 31b7426115f156d116f5b751f7c494be9c0558f7 Mon Sep 17 00:00:00 2001 From: Kevin Harwell Date: Tue, 19 Feb 2013 15:41:37 +0000 Subject: Added Confbridge record_file_append option. Currently, if one starts, stops, and then starts a recording again for a conference the recorded data is appended to the file originally created on the first record start. An option record_file_append has been added that defaults to "yes", but when set to "no" will force creation of a new file between every record start/stop. (issue AST-1088) Reported by: John Bigelow Review: http://reviewboard.digium.internal/r/374/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381729 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_confbridge.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apps/app_confbridge.c') diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 5bc1c5d48..76a269bb1 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -602,7 +602,7 @@ static void set_rec_filename(struct conference_bridge *bridge, struct ast_str ** time_t now; char *ext; - if (ast_str_strlen(*filename)) { + if (ast_str_strlen(*filename) && ast_test_flag(&bridge->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) { return; } @@ -621,7 +621,10 @@ static void set_rec_filename(struct conference_bridge *bridge, struct ast_str ** ast_str_set(filename, 0, "%s-%u", rec_file, (unsigned int)now); } } - ast_str_append(filename, 0, ",a"); + + if (ast_test_flag(&bridge->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) { + ast_str_append(filename, 0, ",a"); + } } static void *record_thread(void *obj) -- cgit v1.2.3