aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-01 19:37:59 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-01 19:37:59 +0000
commit399778395040c809c7805cd678539fa8e4500bc8 (patch)
tree6d5a9eef20c02cf9420917da3379de99d344b8a6 /main/asterisk.c
parentaf3fa0a75106a91bb3942d32c5e661d73a4f169f (diff)
Instead of adding the SOLARIS check to each HAVE_SYSINFO check let's just make the sysinfo autoconf logic a bit pickier about what it considers a usable sysinfo.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77878 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 0dfe19835..118dd2982 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -80,7 +80,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <grp.h>
#include <pwd.h>
#include <sys/stat.h>
-#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
+#if defined(HAVE_SYSINFO)
#include <sys/sysinfo.h>
#endif
#ifdef linux
@@ -166,7 +166,7 @@ int option_debug; /*!< Debug level */
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 defined(HAVE_SYSINFO) && !defined(SOLARIS)
+#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 @@ static int handle_show_settings(int fd, int argc, char *argv[])
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 defined(HAVE_SYSINFO) && !defined(SOLARIS)
+#if defined(HAVE_SYSINFO)
ast_cli(fd, " Min Free Memory: %ld MB\n", option_minmemfree);
#endif
if (ast_localtime(&ast_startuptime, &tm, NULL)) {
@@ -416,7 +416,7 @@ static int handle_show_threads(int fd, int argc, char *argv[])
return 0;
}
-#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
+#if defined(HAVE_SYSINFO)
static const char show_sysinfo_help[] =
"Usage: core show sysinfo\n"
" List current system information.\n";
@@ -1647,7 +1647,7 @@ static struct ast_cli_entry cli_asterisk[] = {
handle_show_threads, "Show running threads",
show_threads_help },
-#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
+#if defined(HAVE_SYSINFO)
{ { "core", "show", "sysinfo", NULL },
handle_show_sysinfo, "Show System Information",
show_sysinfo_help },
@@ -2452,7 +2452,7 @@ static void ast_readconfig(void)
}
} else if (!strcasecmp(v->name, "languageprefix")) {
ast_language_is_prefix = ast_true(v->value);
-#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
+#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 */
@@ -2533,7 +2533,7 @@ int main(int argc, char *argv[])
/* Check for options */
while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:")) != -1) {
switch (c) {
-#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
+#if defined(HAVE_SYSINFO)
case 'e':
if ((sscanf(&optarg[1], "%ld", &option_minmemfree) != 1) || (option_minmemfree < 0)) {
option_minmemfree = 0;