[asterisk-commits] eliel: branch eliel/cli-permissions r151901 - /team/eliel/cli-permissions/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Oct 25 00:08:09 CDT 2008


Author: eliel
Date: Sat Oct 25 00:08:09 2008
New Revision: 151901

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151901
Log:
Fix wrong const values.
Add more documentation.

Modified:
    team/eliel/cli-permissions/main/cli.c

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=151901&r1=151900&r2=151901
==============================================================================
--- team/eliel/cli-permissions/main/cli.c (original)
+++ team/eliel/cli-permissions/main/cli.c Sat Oct 25 00:08:09 2008
@@ -65,17 +65,17 @@
 struct usergroup_cli_perm {
 	int uid;				/*!< User ID (-1 disabled) */
 	int gid;				/*!< Group ID (-1 disabled) */
-	struct cli_perm_head *perms;
+	struct cli_perm_head *perms;		/*!< List of permissions. */
 	AST_LIST_ENTRY(usergroup_cli_perm) list;/*!< List mechanics */
 };
 
 static const char perms_config[] = "permissions.conf";	/*!< CLI permissions config file. */
 int default_perm = 1;				/*!< Default permissions value 1=Permit 0=Deny */
 
-/* mutex used to prevent a user from running the 'cli reload permissions' command while
+/*! \brief mutex used to prevent a user from running the 'cli reload permissions' command while
  * it is already running. */
 AST_MUTEX_DEFINE_STATIC(permsconfiglock);
-/* List of users and permissions. */
+/*! \brief  List of users and permissions. */
 AST_RWLIST_HEAD_STATIC(cli_perms, usergroup_cli_perm);
 
 /*!
@@ -163,7 +163,7 @@
  *  \retval 1 if has permission
  *  \retval 0 if it is not allowed.
  */
-static int cli_has_permissions(const int uid, const int gid, const char *command)
+static int cli_has_permissions(int uid, int gid, const char *command)
 {
 	struct usergroup_cli_perm *user_perm;
 	struct cli_perm *perm;
@@ -2238,7 +2238,7 @@
 	return __ast_cli_generator(text, word, state, 1);
 }
 
-int ast_cli_command(const int uid, const int gid, int fd, const char *s)
+int ast_cli_command(int uid, int gid, int fd, const char *s)
 {
 	char *args[AST_MAX_ARGS + 1];
 	struct ast_cli_entry *e;
@@ -2303,7 +2303,7 @@
 	return 0;
 }
 
-int ast_cli_command_multiple(const int uid, const int gid, int fd, size_t size, const char *s)
+int ast_cli_command_multiple(int uid, int gid, int fd, size_t size, const char *s)
 {
 	char cmd[512];
 	int x, y = 0, count = 0;




More information about the asterisk-commits mailing list