|
|
@ -557,10 +557,12 @@ static void send_unmute_event(struct confbridge_user *user, struct confbridge_co
|
|
|
|
static void set_rec_filename(struct confbridge_conference *conference, struct ast_str **filename, int is_new)
|
|
|
|
static void set_rec_filename(struct confbridge_conference *conference, struct ast_str **filename, int is_new)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char *rec_file = conference->b_profile.rec_file;
|
|
|
|
char *rec_file = conference->b_profile.rec_file;
|
|
|
|
time_t now;
|
|
|
|
|
|
|
|
char *ext;
|
|
|
|
char *ext;
|
|
|
|
|
|
|
|
time_t now;
|
|
|
|
|
|
|
|
|
|
|
|
if (ast_str_strlen(*filename) && ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND) && !is_new) {
|
|
|
|
if (ast_str_strlen(*filename)
|
|
|
|
|
|
|
|
&& ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)
|
|
|
|
|
|
|
|
&& !is_new) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -568,7 +570,8 @@ static void set_rec_filename(struct confbridge_conference *conference, struct as
|
|
|
|
|
|
|
|
|
|
|
|
ast_str_reset(*filename);
|
|
|
|
ast_str_reset(*filename);
|
|
|
|
if (ast_strlen_zero(rec_file)) {
|
|
|
|
if (ast_strlen_zero(rec_file)) {
|
|
|
|
ast_str_set(filename, 0, "confbridge-%s-%u.wav", conference->name, (unsigned int)now);
|
|
|
|
ast_str_set(filename, 0, "confbridge-%s-%u.wav", conference->name,
|
|
|
|
|
|
|
|
(unsigned int) now);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
/* insert time before file extension */
|
|
|
|
/* insert time before file extension */
|
|
|
|
ext = strrchr(rec_file, '.');
|
|
|
|
ext = strrchr(rec_file, '.');
|
|
|
@ -579,7 +582,6 @@ static void set_rec_filename(struct confbridge_conference *conference, struct as
|
|
|
|
ast_str_set(filename, 0, "%s-%u", rec_file, (unsigned int) now);
|
|
|
|
ast_str_set(filename, 0, "%s-%u", rec_file, (unsigned int) now);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) {
|
|
|
|
if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) {
|
|
|
|
ast_str_append(filename, 0, ",a");
|
|
|
|
ast_str_append(filename, 0, ",a");
|
|
|
|
}
|
|
|
|
}
|
|
|
|