aboutsummaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-06 18:31:29 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-06 18:31:29 +0000
commita74f3f93f433594e6ac5a3fef0ea859ebfc43a14 (patch)
tree6514298a4a99d53248d9d2acc4065b9cc8c866d2 /cli.c
parent4b1baec1ef6a8d299c43030c55f9262578258e13 (diff)
add support for per-module version numbers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5862 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-xcli.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/cli.c b/cli.c
index 18aadd871..4f1ce103a 100755
--- a/cli.c
+++ b/cli.c
@@ -227,19 +227,18 @@ static int handle_unload(int fd, int argc, char *argv[])
return RESULT_SUCCESS;
}
-#define MODLIST_FORMAT "%-25s %-40.40s %-10d\n"
-#define MODLIST_FORMAT2 "%-25s %-40.40s %-10s\n"
+#define MODLIST_FORMAT "%-30s %-40.40s %-20.20s %-10d\n"
+#define MODLIST_FORMAT2 "%-30s %-40.40s %-20.20s %-10s\n"
AST_MUTEX_DEFINE_STATIC(climodentrylock);
static int climodentryfd = -1;
-static int modlist_modentry(char *module, char *description, int usecnt, char *like)
+static int modlist_modentry(const char *module, const char *description, int usecnt, const char *version, const char *like)
{
/* Comparing the like with the module */
- if ( strstr(module,like) != NULL) {
- ast_cli(climodentryfd, MODLIST_FORMAT, module, description, usecnt);
+ if (strstr(module, like) != NULL) {
+ ast_cli(climodentryfd, MODLIST_FORMAT, module, description, version, usecnt);
return 1;
-
}
return 0;
}
@@ -385,8 +384,8 @@ static int handle_modlist(int fd, int argc, char *argv[])
ast_mutex_lock(&climodentrylock);
climodentryfd = fd;
- ast_cli(fd, MODLIST_FORMAT2, "Module", "Description", "Use Count");
- ast_cli(fd,"%d modules loaded\n",ast_update_module_list(modlist_modentry,like));
+ ast_cli(fd, MODLIST_FORMAT2, "Module", "Description", "Version", "Use Count");
+ ast_cli(fd,"%d modules loaded\n", ast_update_module_list(modlist_modentry, like));
climodentryfd = -1;
ast_mutex_unlock(&climodentrylock);
return RESULT_SUCCESS;