https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r47366 | russell | 2006-11-09 10:49:39 -0500 (Thu, 09 Nov 2006) | 3 lines
Fix another CLI command, "core show uptime" ...
(issue #8323, reported by johnlange, fixed by myself)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47367
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
{
/* '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);