[asterisk-commits] bbryant: trunk r131445 - /trunk/main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 16 16:24:19 CDT 2008


Author: bbryant
Date: Wed Jul 16 16:24:18 2008
New Revision: 131445

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131445
Log:
Fixes an issue with "core show sysinfo" that used the wrong operator to 
calculate the number of bytes from a sysinfo structure.
unsigned long.

(closes issue #13057)
Reported by: eliel
Patches:
      asterisk.c.patch uploaded by eliel (license 64)

Modified:
    trunk/main/asterisk.c

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=131445&r1=131444&r2=131445
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Wed Jul 16 16:24:18 2008
@@ -505,11 +505,11 @@
 	ast_cli(a->fd, "\nSystem Statistics\n");
 	ast_cli(a->fd, "-----------------\n");
 	ast_cli(a->fd, "  System Uptime:             %ld hours\n", sys_info.uptime/3600);
-	ast_cli(a->fd, "  Total RAM:                 %ld KiB\n", (sys_info.totalram / sys_info.mem_unit)/1024);
-	ast_cli(a->fd, "  Free RAM:                  %ld KiB\n", (sys_info.freeram / sys_info.mem_unit)/1024);
-	ast_cli(a->fd, "  Buffer RAM:                %ld KiB\n", (sys_info.bufferram / sys_info.mem_unit)/1024);
-	ast_cli(a->fd, "  Total Swap Space:          %ld KiB\n", (sys_info.totalswap / sys_info.mem_unit)/1024);
-	ast_cli(a->fd, "  Free Swap Space:           %ld KiB\n\n", (sys_info.freeswap / sys_info.mem_unit)/1024);
+	ast_cli(a->fd, "  Total RAM:                 %ld KiB\n", (sys_info.totalram * sys_info.mem_unit)/1024);
+	ast_cli(a->fd, "  Free RAM:                  %ld KiB\n", (sys_info.freeram * sys_info.mem_unit)/1024);
+	ast_cli(a->fd, "  Buffer RAM:                %ld KiB\n", (sys_info.bufferram * sys_info.mem_unit)/1024);
+	ast_cli(a->fd, "  Total Swap Space:          %ld KiB\n", (sys_info.totalswap * sys_info.mem_unit)/1024);
+	ast_cli(a->fd, "  Free Swap Space:           %ld KiB\n\n", (sys_info.freeswap * sys_info.mem_unit)/1024);
 	ast_cli(a->fd, "  Number of Processes:       %d \n\n", sys_info.procs);
 	return CLI_SUCCESS;
 }




More information about the asterisk-commits mailing list