aboutsummaryrefslogtreecommitdiffstats
path: root/main/cli.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-09 15:49:39 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-09 15:49:39 +0000
commit1518ac4717823c00cf3b7bf4b8c03034924a0ba5 (patch)
treee4dc71f625d1c9046e919cef655fd925523d91be /main/cli.c
parentcebfbf89367c745235b9a51ed85190480c8e6d7e (diff)
Fix another CLI command, "core show uptime" ...
(issue #8323, reported by johnlange, fixed by myself) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47366 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cli.c')
-rw-r--r--main/cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/cli.c b/main/cli.c
index a955d9981..28134d6e2 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -478,9 +478,9 @@ static int handle_showuptime(int fd, int argc, char *argv[])
{
/* 'show uptime [seconds]' */
time_t curtime = time(NULL);
- int printsec = (argc == 3 && !strcasecmp(argv[2],"seconds"));
+ int printsec = (argc == 4 && !strcasecmp(argv[3],"seconds"));
- if (argc != 2 && !printsec)
+ if (argc != 3 && !printsec)
return RESULT_SHOWUSAGE;
if (ast_startuptime)
print_uptimestr(fd, curtime - ast_startuptime, "System uptime", printsec);