summaryrefslogtreecommitdiff
path: root/cli.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-05-18 01:49:13 +0000
committerMark Spencer <markster@digium.com>2005-05-18 01:49:13 +0000
commit38b7f7b4a474cfb9cd79acd09515a84d0e6d746b (patch)
treed354c66fada464fed80154e7002ee445c4d36d52 /cli.c
parent9f9fcca6c0a0c3579f7ef9cd81ec0ffcc748a947 (diff)
Add optional call limit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cli.c')
-rwxr-xr-xcli.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cli.c b/cli.c
index 141ac09ae..80150eefe 100755
--- a/cli.c
+++ b/cli.c
@@ -429,8 +429,13 @@ static int handle_chanlist(int fd, int argc, char *argv[])
ast_mutex_unlock(&c->lock);
c = ast_channel_walk_locked(c);
}
- if(!concise)
+ if(!concise) {
ast_cli(fd, "%d active channel(s)\n", numchans);
+ if (option_maxcalls)
+ ast_cli(fd, "%d of %d max active call(s) (%5.2f%% of capacity)\n", ast_active_calls(), option_maxcalls, ((float)ast_active_calls() / (float)option_maxcalls) * 100.0);
+ else
+ ast_cli(fd, "%d active call(s)\n", ast_active_calls());
+ }
return RESULT_SUCCESS;
}