Fix some log lines and a flag logic.

This commit is contained in:
Joao Mesquita 2010-12-21 23:55:26 -03:00
parent 48ed9c2c5d
commit b49c366efb
1 changed files with 6 additions and 5 deletions

View File

@ -30,6 +30,7 @@
* Chris Danielson <chris at maxpowersoft dot com> * Chris Danielson <chris at maxpowersoft dot com>
* Rupa Schomaker <rupa@rupa.com> * Rupa Schomaker <rupa@rupa.com>
* David Weekly <david@weekly.org> * David Weekly <david@weekly.org>
* Joao Mesquita <jmesquita@gmail.com>
* *
* mod_conference.c -- Software Conference Bridge * 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 (!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"))) { const char * enter_sound = switch_channel_get_variable(channel, "conference_enter_sound");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Playing file...%s\n", conference->name); if (!zstr(enter_sound)) {
conference_play_file(conference, (char *)switch_channel_get_variable(channel, "conference_enter_sound"), CONF_DEFAULT_LEADIN, 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); switch_core_session_get_channel(member->session), !switch_test_flag(conference, CFLAG_WAIT_MOD) ? 0 : 1);
} else { } else {
conference_play_file(conference, conference->enter_sound, CONF_DEFAULT_LEADIN, switch_core_session_get_channel(member->session), 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);
} }
} }
} }