diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2005-05-15 03:03:48 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2005-05-15 03:03:48 +0000 |
commit | 0356b70224db6f40cab8d069bbab6f22714ffa46 (patch) | |
tree | 8b39f6d3ade5b8cc43941163e2fb95ddfb83cbf9 /cli.c | |
parent | b5272684eef7a84ed0d6e893877668c0716d866b (diff) |
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
Diffstat (limited to 'cli.c')
-rwxr-xr-x | cli.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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] = ""; |