]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8789: remove ability to swap to personal canvas while recording and prevent record...
authorBrian West <brian@freeswitch.org>
Tue, 2 Feb 2016 23:33:56 +0000 (17:33 -0600)
committerBrian West <brian@freeswitch.org>
Tue, 2 Feb 2016 23:34:02 +0000 (17:34 -0600)
src/mod/applications/mod_conference/conference_api.c
src/mod/applications/mod_conference/conference_record.c

index 8a1266f82ca25e7ae65fce9a06939330f7620c42..a6b33571879bd8d04734062406587c969778150d 100644 (file)
@@ -1013,6 +1013,10 @@ switch_status_t conference_api_sub_vid_personal(conference_obj_t *conference, sw
        if (argv[2]) {
                on = switch_true(argv[2]);
                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);
                } else {
                        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;
        }
 
+       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]) {
index 37d11178c3a5a7ba5583cede0f792480ce7c2a09..2ff3ae4dbd0a62412239d5a7eb30272d162d7df3 100644 (file)
@@ -60,6 +60,11 @@ void conference_record_launch_thread(conference_obj_t *conference, char *path, i
                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->path = switch_core_strdup(pool, path);
        rec->pool = pool;