[asterisk-commits] dhubbard: trunk r61576 - in /trunk: include/asterisk/ main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Apr 11 14:13:45 MST 2007


Author: dhubbard
Date: Wed Apr 11 16:13:44 2007
New Revision: 61576

URL: http://svn.digium.com/view/asterisk?view=rev&rev=61576
Log:
changed #if HAVE_SYSINFO to #if defined(HAVE_SYSINFO)

Modified:
    trunk/include/asterisk/options.h
    trunk/main/asterisk.c
    trunk/main/pbx.c

Modified: trunk/include/asterisk/options.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/options.h?view=diff&rev=61576&r1=61575&r2=61576
==============================================================================
--- trunk/include/asterisk/options.h (original)
+++ trunk/include/asterisk/options.h Wed Apr 11 16:13:44 2007
@@ -113,7 +113,7 @@
 extern int option_debug;		/*!< Debugging */
 extern int option_maxcalls;		/*!< Maximum number of simultaneous channels */
 extern double option_maxload;
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 extern long option_minmemfree;		/*!< Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
 #endif
 extern char defaultlanguage[];

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=61576&r1=61575&r2=61576
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Wed Apr 11 16:13:44 2007
@@ -80,7 +80,7 @@
 #include <grp.h>
 #include <pwd.h>
 #include <sys/stat.h>
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 #include <sys/sysinfo.h>
 #endif
 #ifdef linux
@@ -166,7 +166,7 @@
 double option_maxload;				/*!< Max load avg on system */
 int option_maxcalls;				/*!< Max number of active calls */
 int option_maxfiles;				/*!< Max number of open file handles (files, sockets) */
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 long option_minmemfree;				/*!< Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
 #endif
 
@@ -360,7 +360,7 @@
 	ast_cli(fd, "  Verbosity:                   %d\n", option_verbose);
 	ast_cli(fd, "  Debug level:                 %d\n", option_debug);
 	ast_cli(fd, "  Max load avg:                %lf\n", option_maxload);
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 	ast_cli(fd, "  Min Free Memory:             %ld MB\n", option_minmemfree);
 #endif
 	if (localtime_r(&ast_startuptime, &tm)) {
@@ -416,7 +416,7 @@
 	return 0;
 }
 
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 static const char show_sysinfo_help[] =
 "Usage: core show sysinfo\n"
 "       List current system information.\n";
@@ -1727,7 +1727,7 @@
 	handle_show_threads, "Show running threads",
 	show_threads_help },
 
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 	{ { "core", "show", "sysinfo", NULL },
 	handle_show_sysinfo, "Show System Information",
 	show_sysinfo_help },
@@ -2525,7 +2525,7 @@
 			ast_copy_string(ast_config_AST_SYSTEM_NAME, v->value, sizeof(ast_config_AST_SYSTEM_NAME));
 		} else if (!strcasecmp(v->name, "languageprefix")) {
 			ast_language_is_prefix = ast_true(v->value);
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 		} else if (!strcasecmp(v->name, "minmemfree")) {
 			/* specify the minimum amount of free memory to retain.  Asterisk should stop accepting new calls
 			 * if the amount of free memory falls below this watermark */
@@ -2605,7 +2605,7 @@
 	/* Check for options */
 	while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:")) != -1) {
 		switch (c) {
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 		case 'e':
 			if ((sscanf(optarg, "%ld", &option_minmemfree) != 1) || (option_minmemfree < 0)) {
 				option_minmemfree = 0;

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=61576&r1=61575&r2=61576
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed Apr 11 16:13:44 2007
@@ -37,7 +37,7 @@
 #include <time.h>
 #include <sys/time.h>
 #include <limits.h>
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 #include <sys/sysinfo.h>
 #endif
 
@@ -2455,7 +2455,7 @@
 {
 	int failed = 0;
 	double curloadavg;
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 	long curfreemem;
 	struct sysinfo sys_info;
 #endif
@@ -2474,7 +2474,7 @@
 			failed = -1;
 		}
 	}
-#if HAVE_SYSINFO
+#if defined(HAVE_SYSINFO)
 	if (option_minmemfree) {
 		if (!sysinfo(&sys_info)) {
 			/* make sure that the free system memory is above the configured low watermark



More information about the asterisk-commits mailing list