[svn-commits] tilghman: branch 1.6.2 r266338 - in /branches/1.6.2: ./ main/asterisk.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 28 15:55:49 CDT 2010


Author: tilghman
Date: Fri May 28 15:55:47 2010
New Revision: 266338

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=266338
Log:
Merged revisions 266337 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r266337 | tilghman | 2010-05-28 15:53:04 -0500 (Fri, 28 May 2010) | 1 line
  
  Only report swap on platforms which can examine those statistics
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/asterisk.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/asterisk.c?view=diff&rev=266338&r1=266337&r2=266338
==============================================================================
--- branches/1.6.2/main/asterisk.c (original)
+++ branches/1.6.2/main/asterisk.c Fri May 28 15:55:47 2010
@@ -562,7 +562,8 @@
 static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	uint64_t physmem, freeram;
-	uint64_t totalswap = 0, freeswap = 0;
+	uint64_t freeswap = 0;
+	int totalswap = 0;
 	int nprocs = 0;
 	long uptime = 0;
 #if defined(HAVE_SYSINFO)
@@ -647,8 +648,10 @@
 #if defined(HAVE_SYSINFO)
 	ast_cli(a->fd, "  Buffer RAM:                %" PRIu64 " KiB\n", ((uint64_t) sys_info.bufferram * sys_info.mem_unit) / 1024);
 #endif
-	ast_cli(a->fd, "  Total Swap Space:          %" PRIu64 " KiB\n", totalswap);
+#if defined (HAVE_SYSCTL) && defined(HAVE_SWAPCTL)
+	ast_cli(a->fd, "  Total Swap Space:          %u KiB\n", totalswap);
 	ast_cli(a->fd, "  Free Swap Space:           %" PRIu64 " KiB\n\n", freeswap);
+#endif
 	ast_cli(a->fd, "  Number of Processes:       %d \n\n", nprocs);
 	return CLI_SUCCESS;
 }




More information about the svn-commits mailing list