summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-08-12 04:47:51 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-08-12 04:47:51 -0500
commit9e06073e830e1029300431eb0b913de18a4ff736 (patch)
tree5f71205ab4576b5d247cc9cfd24fbc4f5c54f0ef /main
parent088104b2ab86d865074aaad2d2869c3a7d7fe56f (diff)
parent4a5da6c9b42d875e342672c6031de82eb5bab6fd (diff)
Merge "taskprocessor.c: Tweak high water checks."
Diffstat (limited to 'main')
-rw-r--r--main/taskprocessor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/taskprocessor.c b/main/taskprocessor.c
index 4a8497f11..ceb5f5c7f 100644
--- a/main/taskprocessor.c
+++ b/main/taskprocessor.c
@@ -608,7 +608,7 @@ int ast_taskprocessor_alert_set_levels(struct ast_taskprocessor *tps, long low_w
tps_alert_add(tps, -1);
}
} else {
- if (high_water <= tps->tps_queue_size) {
+ if (high_water < tps->tps_queue_size) {
/* Update water mark alert immediately */
tps->high_water_alert = 1;
tps_alert_add(tps, +1);
@@ -883,11 +883,11 @@ static int taskprocessor_push(struct ast_taskprocessor *tps, struct tps_task *t)
AST_LIST_INSERT_TAIL(&tps->tps_queue, t, list);
previous_size = tps->tps_queue_size++;
- if (previous_size >= tps->tps_queue_high) {
+ if (tps->tps_queue_high <= tps->tps_queue_size) {
if (!tps->high_water_warned) {
tps->high_water_warned = 1;
- ast_log(LOG_WARNING, "The '%s' task processor queue reached %d scheduled tasks.\n",
- tps->name, previous_size);
+ ast_log(LOG_WARNING, "The '%s' task processor queue reached %ld scheduled tasks.\n",
+ tps->name, tps->tps_queue_size);
}
if (!tps->high_water_alert) {
tps->high_water_alert = 1;