From: Anthony Minessale Date: Thu, 12 Feb 2015 16:53:21 +0000 (-0600) Subject: FS-7513: don't attach when you don't have video X-Git-Tag: v1.6.2~614^2~404 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47cb08c4911b01130ee8766453c2e3dd3ffb4125;p=thirdparty%2Ffreeswitch.git FS-7513: don't attach when you don't have video --- diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index d0d359a192..6b48603814 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -1097,9 +1097,15 @@ static switch_status_t attach_video_layer(conference_member_t *member, int idx) switch_status_t status = SWITCH_STATUS_SUCCESS; const char *banner = NULL; switch_rgb_color_t color; - + if (!member->session) abort(); + channel = switch_core_session_get_channel(member->session); + + if (!switch_channel_test_flag(channel, CF_VIDEO)) { + return SWITCH_STATUS_FALSE; + } + switch_mutex_lock(member->conference->canvas->mutex); layer = &member->conference->canvas->layers[idx]; @@ -1116,7 +1122,7 @@ static switch_status_t attach_video_layer(conference_member_t *member, int idx) reset_layer(member->conference->canvas, layer); - channel = switch_core_session_get_channel(member->session); + res_id = switch_channel_get_variable_dup(channel, "video_reservation_id", SWITCH_FALSE, -1); if (layer->geometry.res_id || res_id) {