[asterisk-commits] kharwell: trunk r399226 - in /trunk: ./ apps/confbridge/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 17 09:58:24 CDT 2013


Author: kharwell
Date: Tue Sep 17 09:58:22 2013
New Revision: 399226

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399226
Log:
Confbridge: empty conference not being torn down

Confbridge would not properly tear down an empty conference bridge when all
users were kicked via end_marked=yes and at least one user was also set to
wait_marked.  This occurred because while end_marked users were being kicked
and at least one was also set to wait_marked then the leave wait_marked handler
would be called on that user, but there would be no waiting user (still
considered active).  The waiting users would decrement and now be negative.  The
conference would remain, but be put into an inactive state.  The solution was
to move from the active list to the wait list, those users with wait_marked set
right before kicking.  This allows both the active and wait users to decrement
correctly and the confbridge to tear down properly.

A crashed also occurred when trying to list the specific conference from the CLI.
This happened because the conference specified was invalid.  Since the
conference properly tears down now there is no way to reference it thus
alleviating the crash as well.

(closes issue ASTERISK-21859)
Reported by: Chris Gentle
Review: https://reviewboard.asterisk.org/r/2848/
........

Merged revisions 399222 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 399225 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/apps/confbridge/conf_state_multi_marked.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Tue Sep 17 09:58:22 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399100,399136,399146,399160,399197,399207
+/branches/12:1-398558,398560-398577,398579-399100,399136,399146,399160,399197,399207,399225

Modified: trunk/apps/confbridge/conf_state_multi_marked.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_state_multi_marked.c?view=diff&rev=399226&r1=399225&r2=399226
==============================================================================
--- trunk/apps/confbridge/conf_state_multi_marked.c (original)
+++ trunk/apps/confbridge/conf_state_multi_marked.c Tue Sep 17 09:58:22 2013
@@ -93,8 +93,15 @@
 		}
 
 		AST_LIST_TRAVERSE_SAFE_BEGIN(&user->conference->active_list, user_iter, list) {
-			/* Kick ENDMARKED cbu_iters */
+			/* Kick ENDMARKED user_iters */
 			if (ast_test_flag(&user_iter->u_profile, USER_OPT_ENDMARKED)) {
+				if (ast_test_flag(&user_iter->u_profile, USER_OPT_WAITMARKED) &&
+						  !ast_test_flag(&user_iter->u_profile, USER_OPT_MARKEDUSER)) {
+					AST_LIST_REMOVE_CURRENT(list);
+					user_iter->conference->activeusers--;
+					AST_LIST_INSERT_TAIL(&user_iter->conference->waiting_list, user_iter, list);
+					user_iter->conference->waitingusers++;
+				}
 				user_iter->kicked = 1;
 				ast_bridge_remove(user_iter->conference->bridge, user_iter->chan);
 			} else if (ast_test_flag(&user_iter->u_profile, USER_OPT_WAITMARKED) &&




More information about the asterisk-commits mailing list