reduce indentation a couple of levels

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-07-03 05:32:08 +00:00
parent b391c098eb
commit a4c7a1c97c

View File

@@ -2505,13 +2505,16 @@ static int admin_exec(struct ast_channel *chan, void *data) {
AST_APP_ARG(user); AST_APP_ARG(user);
); );
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "MeetMeAdmin requires an argument!\n");
return -1;
}
LOCAL_USER_ADD(u); LOCAL_USER_ADD(u);
AST_LIST_LOCK(&confs); AST_LIST_LOCK(&confs);
/* The param has the conference number the user and the command to execute */
if (!ast_strlen_zero(data)) {
params = ast_strdupa((char *) data);
params = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, params); AST_STANDARD_APP_ARGS(args, params);
if (!args.command) { if (!args.command) {
@@ -2525,11 +2528,17 @@ static int admin_exec(struct ast_channel *chan, void *data) {
break; break;
} }
if (!cnf) {
ast_log(LOG_WARNING, "Conference number '%s' not found!\n", args.confno);
LOCAL_USER_REMOVE(u);
AST_LIST_UNLOCK(&confs);
return 0;
}
if (args.user) if (args.user)
user = find_user(cnf, args.user); user = find_user(cnf, args.user);
if (cnf) { switch (*args.command) {
switch((int) (*args.command)) {
case 76: /* L: Lock */ case 76: /* L: Lock */
cnf->locked = 1; cnf->locked = 1;
break; break;
@@ -2626,10 +2635,7 @@ static int admin_exec(struct ast_channel *chan, void *data) {
ast_log(LOG_NOTICE, "Specified User not found!\n"); ast_log(LOG_NOTICE, "Specified User not found!\n");
break; break;
} }
} else {
ast_log(LOG_NOTICE, "Conference Number not found\n");
}
}
AST_LIST_UNLOCK(&confs); AST_LIST_UNLOCK(&confs);
LOCAL_USER_REMOVE(u); LOCAL_USER_REMOVE(u);