From b49c366efb37d9eebd9f597d2bafb27d3709115f Mon Sep 17 00:00:00 2001 From: Joao Mesquita Date: Tue, 21 Dec 2010 23:55:26 -0300 Subject: [PATCH] Fix some log lines and a flag logic. --- src/mod/applications/mod_conference/mod_conference.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 9c3ba0f615..fa1f12c13f 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -30,6 +30,7 @@ * Chris Danielson * Rupa Schomaker * David Weekly + * Joao Mesquita * * mod_conference.c -- Software Conference Bridge * @@ -689,13 +690,13 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe } if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ) && !zstr(conference->enter_sound)) { - if (!zstr(switch_channel_get_variable(channel, "conference_enter_sound"))) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Playing file...%s\n", conference->name); - conference_play_file(conference, (char *)switch_channel_get_variable(channel, "conference_enter_sound"), CONF_DEFAULT_LEADIN, - switch_core_session_get_channel(member->session), switch_test_flag(conference, CFLAG_WAIT_MOD) ? 0 : 1); + const char * enter_sound = switch_channel_get_variable(channel, "conference_enter_sound"); + if (!zstr(enter_sound)) { + conference_play_file(conference, (char *)enter_sound, CONF_DEFAULT_LEADIN, + switch_core_session_get_channel(member->session), !switch_test_flag(conference, CFLAG_WAIT_MOD) ? 0 : 1); } else { conference_play_file(conference, conference->enter_sound, CONF_DEFAULT_LEADIN, switch_core_session_get_channel(member->session), - switch_test_flag(conference, CFLAG_WAIT_MOD) ? 0 : 1); + !switch_test_flag(conference, CFLAG_WAIT_MOD) ? 0 : 1); } } }