aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-06 21:07:49 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-06 21:07:49 +0000
commitdc555ef5df9f2ecfa5400f343bc9650bb82531cc (patch)
tree8c22138f30ee16ce868bbee99ca6279e1358be64
parentf9d47d5ac8b8115c4316870ffba2036862774139 (diff)
Merged revisions 317917 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r317917 | russell | 2011-05-06 16:06:33 -0500 (Fri, 06 May 2011) | 7 lines Fix calculation of free RAM to make minmemfree option work. (closes issue #17124) Reported by: loic Patches: pbx_c.diff uploaded by loic (license 1020) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@317919 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/pbx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 321b29a01..b9c853505 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -5134,7 +5134,7 @@ static int increase_call_count(const struct ast_channel *c)
if (!sysinfo(&sys_info)) {
/* make sure that the free system memory is above the configured low watermark
* convert the amount of freeram from mem_units to MB */
- curfreemem = sys_info.freeram / sys_info.mem_unit;
+ curfreemem = sys_info.freeram * sys_info.mem_unit;
curfreemem /= 1024 * 1024;
if (curfreemem < option_minmemfree) {
ast_log(LOG_WARNING, "Available system memory (~%ldMB) is below the configured low watermark (%ldMB)\n", curfreemem, option_minmemfree);