mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Fix another CLI command, "core show uptime" ...
(issue #8323, reported by johnlange, fixed by myself) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -478,9 +478,9 @@ static int handle_showuptime(int fd, int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
/* 'show uptime [seconds]' */
|
/* 'show uptime [seconds]' */
|
||||||
time_t curtime = time(NULL);
|
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;
|
return RESULT_SHOWUSAGE;
|
||||||
if (ast_startuptime)
|
if (ast_startuptime)
|
||||||
print_uptimestr(fd, curtime - ast_startuptime, "System uptime", printsec);
|
print_uptimestr(fd, curtime - ast_startuptime, "System uptime", printsec);
|
||||||
|
Reference in New Issue
Block a user