[svn-commits] bbryant: trunk r131484 - /trunk/funcs/func_sysinfo.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 16 16:54:09 CDT 2008


Author: bbryant
Date: Wed Jul 16 16:54:08 2008
New Revision: 131484

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131484
Log:
Fixes sysinfo operator issue also fixed elsewhere in r131445.

(issue #13057)

Modified:
    trunk/funcs/func_sysinfo.c

Modified: trunk/funcs/func_sysinfo.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_sysinfo.c?view=diff&rev=131484&r1=131483&r2=131484
==============================================================================
--- trunk/funcs/func_sysinfo.c (original)
+++ trunk/funcs/func_sysinfo.c Wed Jul 16 16:54:08 2008
@@ -60,15 +60,15 @@
 	else if (!strcasecmp("uptime", data)) {             /* in hours */
 		snprintf(buf, len, "%ld", sys_info.uptime/3600);
 	} else if (!strcasecmp("totalram", data)) {         /* in KiB */
-		snprintf(buf, len, "%ld",(sys_info.totalram / sys_info.mem_unit)/1024);
+		snprintf(buf, len, "%ld",(sys_info.totalram * sys_info.mem_unit)/1024);
 	} else if (!strcasecmp("freeram", data)) {          /* in KiB */
-		snprintf(buf, len, "%ld",(sys_info.freeram / sys_info.mem_unit)/1024);
+		snprintf(buf, len, "%ld",(sys_info.freeram * sys_info.mem_unit)/1024);
 	} else if (!strcasecmp("bufferram", data)) {        /* in KiB */
-		snprintf(buf, len, "%ld",(sys_info.bufferram / sys_info.mem_unit)/1024);
+		snprintf(buf, len, "%ld",(sys_info.bufferram * sys_info.mem_unit)/1024);
 	} else if (!strcasecmp("totalswap", data)) {        /* in KiB */
-		snprintf(buf, len, "%ld",(sys_info.totalswap / sys_info.mem_unit)/1024);
+		snprintf(buf, len, "%ld",(sys_info.totalswap * sys_info.mem_unit)/1024);
 	} else if (!strcasecmp("freeswap", data)) {         /* in KiB */
-		snprintf(buf, len, "%ld",(sys_info.freeswap / sys_info.mem_unit)/1024);
+		snprintf(buf, len, "%ld",(sys_info.freeswap * sys_info.mem_unit)/1024);
 	} else if (!strcasecmp("numprocs", data)) {
 		snprintf(buf, len, "%d", sys_info.procs);
 	}




More information about the svn-commits mailing list