[svn-commits] mjordan: trunk r394531 - in /trunk: CHANGES apps/app_confbridge.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Jul 16 17:33:29 CDT 2013
Author: mjordan
Date: Tue Jul 16 17:33:27 2013
New Revision: 394531
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394531
Log:
Add 'kick all' capability to ConfBridge CLI command
This patch adds the ability to kick all users out of a conference from the
ConfBridge kick CLI command. It is invoked by passing 'all' as the channel
parameter to the CLI command, i.e., "confbridge kick <conf> all".
Note that this patch was modified slightly to conform to trunk.
(closes issue ASTERISK-21827)
Reported by: dorianlogan
patches:
kickall-patch_v2.diff uploaded by dorianlogan (License 6504)
Modified:
trunk/CHANGES
trunk/apps/app_confbridge.c
Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=394531&r1=394530&r2=394531
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Jul 16 17:33:27 2013
@@ -25,6 +25,12 @@
------------------
* Application removed. It was a holdover from when AgentCallbackLogin was
removed.
+
+ConfBridge
+------------------
+ * All participants in a bridge can now be kicked out of a conference room
+ by specifying the channel parameter as 'all' in the ConfBridge kick CLI
+ command, i.e., "confbridge kick <conference> all"
ForkCDR
------------------
Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=394531&r1=394530&r2=394531
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Tue Jul 16 17:33:27 2013
@@ -2069,6 +2069,7 @@
static int kick_conference_participant(struct confbridge_conference *conference, const char *channel)
{
+ int res = -1;
struct confbridge_user *user = NULL;
SCOPED_AO2LOCK(bridge_lock, conference);
@@ -2077,6 +2078,10 @@
user->kicked = 1;
ast_bridge_remove(conference->bridge, user->chan);
return 0;
+ } else if (!strcasecmp("all", channel)) {
+ user->kicked = 1;
+ ast_bridge_remove(conference->bridge, user->chan);
+ res = 0;
}
}
AST_LIST_TRAVERSE(&conference->waiting_list, user, list) {
@@ -2084,10 +2089,14 @@
user->kicked = 1;
ast_bridge_remove(conference->bridge, user->chan);
return 0;
- }
- }
-
- return -1;
+ } else if (!strcasecmp("all", channel)) {
+ user->kicked = 1;
+ ast_bridge_remove(conference->bridge, user->chan);
+ res = 0;
+ }
+ }
+
+ return res;
}
static char *complete_confbridge_name(const char *line, const char *word, int pos, int state)
More information about the svn-commits
mailing list