diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-07 23:14:04 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-07 23:14:04 +0000 |
commit | 140740610055d0628cbfa7d95d2d0c6380fb4957 (patch) | |
tree | 6a36946532d516f0b7c4b472cf7a523b532eebac /main/asterisk.c | |
parent | 4bb1ce1ef1a8a5517840da267e7455c062c8781f (diff) |
fix "core show profile" parsing.
Needs to go in 1.4 too, but ENOTIME now
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47300 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 5d3e57210..914ee9dbd 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -447,13 +447,13 @@ static int handle_show_profile(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; |