From f5c1139da439fb8cb79ed06fd958658cef50ef89 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Sun, 15 May 2005 03:03:48 +0000 Subject: add functions to register/unregister multiple CLI commands in a single operation (bug #4255, with minor mods) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5662 f38db490-d61c-443f-a65b-d21fe96a405b --- cli.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'cli.c') diff --git a/cli.c b/cli.c index f5865cc1e..141ac09ae 100755 --- a/cli.c +++ b/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] = ""; -- cgit v1.2.3