From: wadam Date: Thu, 1 Dec 2011 16:40:18 +0000 (-0500) Subject: Fixed Bug#2018 - The threshold of cpu warning message should be increased X-Git-Tag: v1.2.3^2~71^2^2~217^2~14^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dabe5409bf7fb88f17b4580d7bcf0d3151f67fc;p=thirdparty%2Ffreeswitch.git Fixed Bug#2018 - The threshold of cpu warning message should be increased --- diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index 0205ab36b1..8ec6a3344f 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -5594,15 +5594,15 @@ static void *ftdm_cpu_monitor_run(ftdm_thread_t *me, void *obj) if (monitor->alarm) { if ((int)time >= (100 - monitor->set_alarm_threshold)) { - ftdm_log(FTDM_LOG_DEBUG, "CPU alarm OFF (idle:%d)\n", (int) time); + ftdm_log(FTDM_LOG_DEBUG, "CPU alarm is OFF (cpu usage:%d)\n", (int) (100-time)); monitor->alarm = 0; } - if (monitor->alarm_action_flags & FTDM_CPU_ALARM_ACTION_WARN) { + if (monitor->alarm && (monitor->alarm_action_flags & FTDM_CPU_ALARM_ACTION_WARN)) { ftdm_log(FTDM_LOG_WARNING, "CPU alarm is ON (cpu usage:%d)\n", (int) (100-time)); } } else { if ((int)time <= (100-monitor->reset_alarm_threshold)) { - ftdm_log(FTDM_LOG_DEBUG, "CPU alarm ON (idle:%d)\n", (int) time); + ftdm_log(FTDM_LOG_DEBUG, "CPU alarm is ON (cpu usage:%d)\n", (int) (100-time)); monitor->alarm = 1; } }