[asterisk-commits] mmichelson: branch file/bridging r172401 - /team/file/bridging/apps/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 29 14:50:22 CST 2009
Author: mmichelson
Date: Thu Jan 29 14:50:22 2009
New Revision: 172401
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=172401
Log:
Fix a race condition in app_confbridge
In order for this to occur, the option to play music on hold
if there is only one person in the conference must be set.
If a second caller entered the conference while the first
caller was listening to the "conf-onlyperson" prompt, then
the first caller would have music on hold played to him even
though a second caller had entered the conference. This was due
to the fact that playing the prompt to the first caller caused
the conference bridge to become unlocked, thus allowing the second
caller to slip in.
The fix for this is to re-check the number of users after the prompt
completes.
Modified:
team/file/bridging/apps/app_confbridge.c
Modified: team/file/bridging/apps/app_confbridge.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/apps/app_confbridge.c?view=diff&rev=172401&r1=172400&r2=172401
==============================================================================
--- team/file/bridging/apps/app_confbridge.c (original)
+++ team/file/bridging/apps/app_confbridge.c Thu Jan 29 14:50:22 2009
@@ -325,7 +325,10 @@
play_prompt_to_channel(conference_bridge, conference_bridge_user->chan, "conf-onlyperson");
}
/* If we need to start music on hold on the channel do so now */
- if (ast_test_flag(&conference_bridge_user->flags, OPTION_MUSICONHOLD)) {
+ /* We need to re-check the number of users in the conference bridge here because another conference bridge
+ * participant could have joined while the above prompt was playing for the first user.
+ */
+ if (conference_bridge->users == 1 && ast_test_flag(&conference_bridge_user->flags, OPTION_MUSICONHOLD)) {
ast_moh_start(conference_bridge_user->chan, conference_bridge_user->opt_args[OPTION_MUSICONHOLD_CLASS], NULL);
}
return;
More information about the asterisk-commits
mailing list