mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
add functions to register/unregister multiple CLI commands in a single operation (bug #4255, with minor mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
19
cli.c
19
cli.c
@@ -992,6 +992,25 @@ int ast_cli_register(struct ast_cli_entry *e)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* register/unregister an array of entries.
|
||||
*/
|
||||
void ast_cli_register_multiple(struct ast_cli_entry *e, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i < len; i++)
|
||||
ast_cli_register(e + i);
|
||||
}
|
||||
|
||||
void ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i < len; i++)
|
||||
ast_cli_unregister(e + i);
|
||||
}
|
||||
|
||||
static int help_workhorse(int fd, char *match[])
|
||||
{
|
||||
char fullcmd1[80] = "";
|
||||
|
Reference in New Issue
Block a user