[asterisk-commits] file: branch file/bridging r111833 - /team/file/bridging/apps/app_confbridge.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Mar 28 15:21:46 CDT 2008
Author: file
Date: Fri Mar 28 15:21:45 2008
New Revision: 111833
URL: http://svn.digium.com/view/asterisk?view=rev&rev=111833
Log:
Make getting the join/leave sound thread safe and store a copy locally.
Modified:
team/file/bridging/apps/app_confbridge.c
Modified: team/file/bridging/apps/app_confbridge.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_confbridge.c?view=diff&rev=111833&r1=111832&r2=111833
==============================================================================
--- team/file/bridging/apps/app_confbridge.c (original)
+++ team/file/bridging/apps/app_confbridge.c Fri Mar 28 15:21:45 2008
@@ -559,8 +559,7 @@
struct conference_bridge_user conference_bridge_user = {
.chan = chan,
};
- const char *join_sound = pbx_builtin_getvar_helper(chan, "CONFBRIDGE_JOIN_SOUND");
- const char *leave_sound = pbx_builtin_getvar_helper(chan, "CONFBRIDGE_LEAVE_SOUND");
+ const char *join_sound, *leave_sound;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(conf_name);
AST_APP_ARG(options);
@@ -601,6 +600,12 @@
if (ast_test_flag(&conference_bridge_user.flags, OPTION_STARTMUTED)) {
conference_bridge_user.features.mute = 1;
}
+
+ /* Grab join/leave sounds from the channel */
+ ast_channel_lock(chan);
+ join_sound = ast_strdupa(pbx_builtin_getvar_helper(chan, "CONFBRIDGE_JOIN_SOUND"));
+ leave_sound = ast_strdupa(pbx_builtin_getvar_helper(chan, "CONFBRIDGE_LEAVE_SOUND"));
+ ast_channel_unlock(chan);
/* If there is 1 or more people already in the conference then play our join sound unless overridden */
if (!ast_test_flag(&conference_bridge_user.flags, OPTION_QUIET) && !ast_strlen_zero(join_sound) && conference_bridge->users >= 2) {
More information about the asterisk-commits
mailing list