aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-07 22:17:40 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-07 22:17:40 +0000
commit46ecea95a1dbcb54f6e819405614598d569da256 (patch)
tree89b87332d8edad9a789104a094f94742baef4ae9 /apps
parent5934e6dd2a6f2234d46c87d86a013d145bf883d9 (diff)
Make a minor tweak to admin_exec() - don't lock the conference list until it
is actually necessary. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63326 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_meetme.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 01cf838a6..0e50414db 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -2768,17 +2768,16 @@ static int admin_exec(struct ast_channel *chan, void *data) {
u = ast_module_user_add(chan);
- AST_LIST_LOCK(&confs);
-
params = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, params);
if (!args.command) {
ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");
- AST_LIST_UNLOCK(&confs);
ast_module_user_remove(u);
return -1;
}
+
+ AST_LIST_LOCK(&confs);
AST_LIST_TRAVERSE(&confs, cnf, list) {
if (!strcmp(cnf->confno, args.confno))
break;
@@ -2953,7 +2952,7 @@ static int channel_admin_exec(struct ast_channel *chan, void *data) {
}
/* perform the specified action */
- switch(*args.command) {
+ switch (*args.command) {
case 77: /* M: Mute */
user->adminflags |= ADMINFLAG_MUTED;
break;