[asterisk-commits] russell: trunk r63326 - /trunk/apps/app_meetme.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 7 15:17:41 MST 2007


Author: russell
Date: Mon May  7 17:17:40 2007
New Revision: 63326

URL: http://svn.digium.com/view/asterisk?view=rev&rev=63326
Log:
Make a minor tweak to admin_exec() - don't lock the conference list until it
is actually necessary.

Modified:
    trunk/apps/app_meetme.c

Modified: trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_meetme.c?view=diff&rev=63326&r1=63325&r2=63326
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Mon May  7 17:17:40 2007
@@ -2768,17 +2768,16 @@
 
 	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 @@
 	}
 	
 	/* perform the specified action */
-	switch(*args.command) {
+	switch (*args.command) {
 		case 77: /* M: Mute */ 
 			user->adminflags |= ADMINFLAG_MUTED;
 			break;



More information about the asterisk-commits mailing list