[asterisk-commits] russell: branch 1.4 r47366 - /branches/1.4/main/cli.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Nov 9 08:49:40 MST 2006


Author: russell
Date: Thu Nov  9 09:49:39 2006
New Revision: 47366

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47366
Log:
Fix another CLI command, "core show uptime" ...
(issue #8323, reported by johnlange, fixed by myself)

Modified:
    branches/1.4/main/cli.c

Modified: branches/1.4/main/cli.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cli.c?view=diff&rev=47366&r1=47365&r2=47366
==============================================================================
--- branches/1.4/main/cli.c (original)
+++ branches/1.4/main/cli.c Thu Nov  9 09:49:39 2006
@@ -478,9 +478,9 @@
 {
 	/* 'show uptime [seconds]' */
 	time_t curtime = time(NULL);
-	int printsec = (argc == 3 && !strcasecmp(argv[2],"seconds"));
-
-	if (argc != 2 && !printsec)
+	int printsec = (argc == 4 && !strcasecmp(argv[3],"seconds"));
+
+	if (argc != 3 && !printsec)
 		return RESULT_SHOWUSAGE;
 	if (ast_startuptime)
 		print_uptimestr(fd, curtime - ast_startuptime, "System uptime", printsec);



More information about the asterisk-commits mailing list