aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-09 16:04:38 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-09 16:04:38 +0000
commit319cfe21b9fa42b1d1fbeb4fedbedd1ba585b457 (patch)
tree1583637e314b88173a6bbfca4f08c14ef05c3451 /main
parent1518ac4717823c00cf3b7bf4b8c03034924a0ba5 (diff)
Fix argument parsing for the "core show profile" CLI command
(fixed by rizzo in his branch, team/rizzo/astobj2) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47369 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/asterisk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index b8a93e9ce..f70893e54 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -448,13 +448,13 @@ static int handle_show_profile_deprecated(int fd, int argc, char *argv[])
min = 0;
max = prof_data->entries;
- if (argc >= 3) { /* specific entries */
- if (isdigit(argv[2][0])) {
- min = atoi(argv[2]);
- if (argc == 4 && strcmp(argv[3], "-"))
- max = atoi(argv[3]);
+ if (argc > 3) { /* specific entries */
+ if (isdigit(argv[3][0])) {
+ min = atoi(argv[3]);
+ if (argc == 5 && strcmp(argv[4], "-"))
+ max = atoi(argv[4]);
} else
- search = argv[2];
+ search = argv[3];
}
if (max > prof_data->entries)
max = prof_data->entries;