mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-04 06:36:09 +00:00
FS-8789: remove ability to swap to personal canvas while recording and prevent recording while personal canvas is on.
This commit is contained in:
parent
46ebf3cea7
commit
277ce6d0de
@ -1013,6 +1013,10 @@ switch_status_t conference_api_sub_vid_personal(conference_obj_t *conference, sw
|
|||||||
if (argv[2]) {
|
if (argv[2]) {
|
||||||
on = switch_true(argv[2]);
|
on = switch_true(argv[2]);
|
||||||
if (on) {
|
if (on) {
|
||||||
|
if (conference->record_count > 0) {
|
||||||
|
stream->write_function(stream, "-ERR conference is recording, not enabling vid-personal.\n");
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
conference_utils_set_flag(conference, CFLAG_PERSONAL_CANVAS);
|
conference_utils_set_flag(conference, CFLAG_PERSONAL_CANVAS);
|
||||||
} else {
|
} else {
|
||||||
conference_utils_clear_flag(conference, CFLAG_PERSONAL_CANVAS);
|
conference_utils_clear_flag(conference, CFLAG_PERSONAL_CANVAS);
|
||||||
@ -2411,6 +2415,11 @@ switch_status_t conference_api_sub_record(conference_obj_t *conference, switch_s
|
|||||||
return SWITCH_STATUS_GENERR;
|
return SWITCH_STATUS_GENERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conference_utils_test_flag(conference, CFLAG_PERSONAL_CANVAS)) {
|
||||||
|
stream->write_function(stream, "-ERR Personal Canvas enabled, recording not permitted.\n");
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (argv[3]) {
|
if (argv[3]) {
|
||||||
|
|
||||||
if (argv[3]) {
|
if (argv[3]) {
|
||||||
|
@ -60,6 +60,11 @@ void conference_record_launch_thread(conference_obj_t *conference, char *path, i
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conference_utils_test_flag(conference, CFLAG_PERSONAL_CANVAS)) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Personal Canvas enabled, recording not permitted.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
rec->conference = conference;
|
rec->conference = conference;
|
||||||
rec->path = switch_core_strdup(pool, path);
|
rec->path = switch_core_strdup(pool, path);
|
||||||
rec->pool = pool;
|
rec->pool = pool;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user