[asterisk-commits] twilson: branch eliel/cli-permissions r158852 - in /team/eliel/cli-permission...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 24 15:36:51 CST 2008


Author: twilson
Date: Mon Nov 24 15:36:51 2008
New Revision: 158852

URL: http://svn.digium.com/view/asterisk?view=rev&rev=158852
Log:
Fix calls to ast_cli_command and remove deprecation check in cli.c now that clialiases has been merged

Modified:
    team/eliel/cli-permissions/channels/console_gui.c
    team/eliel/cli-permissions/main/cli.c
    team/eliel/cli-permissions/res/res_clialiases.c

Modified: team/eliel/cli-permissions/channels/console_gui.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/channels/console_gui.c?view=diff&rev=158852&r1=158851&r2=158852
==============================================================================
--- team/eliel/cli-permissions/channels/console_gui.c (original)
+++ team/eliel/cli-permissions/channels/console_gui.c Mon Nov 24 15:36:51 2008
@@ -396,7 +396,7 @@
 		break;
 
 	case KEY_MUTE: /* send or do not send audio */
-		ast_cli_command(env->gui->outfd, "console mute toggle");
+		ast_cli_command(CLI_NO_PERMS, CLI_NO_PERMS, env->gui->outfd, "console mute toggle");
 		break;
 
 	case KEY_FREEZE: /* freeze/unfreeze the incoming frames */
@@ -432,7 +432,7 @@
 	ast_log(LOG_WARNING, "keypad_pick_up called\n");
 
 	if (env->owner) { /* someone is calling us, just answer */
-		ast_cli_command(gui->outfd, "console answer");
+		ast_cli_command(CLI_NO_PERMS, CLI_NO_PERMS, gui->outfd, "console answer");
 	} else { /* we have someone to call */
 		char buf[160];
 		const char *who = ast_skip_blanks(read_message(gui->bd_msg));
@@ -442,7 +442,7 @@
 		print_message(gui->bd_dialed, "\n");
 		print_message(gui->bd_dialed, who);
 		reset_board(gui->bd_msg);
-		ast_cli_command(gui->outfd, buf);
+		ast_cli_command(CLI_NO_PERMS, CLI_NO_PERMS, gui->outfd, buf);
 	}
 }
 
@@ -737,7 +737,7 @@
 		keypad_pick_up(env);
 		break;
 	case KEY_HANG_UP:
-		ast_cli_command(gui->outfd, "console hangup");
+		ast_cli_command(CLI_NO_PERMS, CLI_NO_PERMS, gui->outfd, "console hangup");
 		break;
 
 	/* other functions */
@@ -977,7 +977,7 @@
 #if 0 /* do not react, we don't want to die because the window is minimized */
 				if (ev[i].active.gain == 0 && ev[i].active.state & SDL_APPACTIVE) {
 					ast_log(LOG_WARNING, "/* somebody has killed us ? */");
-					ast_cli_command(gui->outfd, "stop now");
+					ast_cli_command(CLI_NO_PERMS, CLI_NO_PERMS, gui->outfd, "stop now");
 				}
 #endif
 				break;

Modified: team/eliel/cli-permissions/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/main/cli.c?view=diff&rev=158852&r1=158851&r2=158852
==============================================================================
--- team/eliel/cli-permissions/main/cli.c (original)
+++ team/eliel/cli-permissions/main/cli.c Mon Nov 24 15:36:51 2008
@@ -971,10 +971,6 @@
 		while ((ce = cli_next(ce))) {
 			/* Hide commands that start with '_' */
 			if (ce->_full_cmd[0] == '_') {
-				continue;
-			}
-			/* Hide commands that are marked as deprecated. */
-			if (ce->deprecated) {
 				continue;
 			}
 			if (cli_has_permissions(uid, gid, ce->_full_cmd)) {

Modified: team/eliel/cli-permissions/res/res_clialiases.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/res/res_clialiases.c?view=diff&rev=158852&r1=158851&r2=158852
==============================================================================
--- team/eliel/cli-permissions/res/res_clialiases.c (original)
+++ team/eliel/cli-permissions/res/res_clialiases.c Mon Nov 24 15:36:51 2008
@@ -122,9 +122,9 @@
 			ast_str_append(&real_cmd, 0, " %s", a->argv[i - 1]);
 		}
 
-		ast_cli_command(a->fd, real_cmd->str);
+		ast_cli_command(CLI_NO_PERMS, CLI_NO_PERMS, a->fd, real_cmd->str);
 	} else {
-		ast_cli_command(a->fd, alias->real_cmd);
+		ast_cli_command(CLI_NO_PERMS, CLI_NO_PERMS, a->fd, alias->real_cmd);
 	}
 
 	ao2_ref(alias, -1);




More information about the asterisk-commits mailing list