summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-01-12 13:18:35 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-01-12 13:18:35 -0600
commite89d2691e9605ab15a23b019e58e60460001aee0 (patch)
tree6386904b73ea0d5a3894213b2dbe49d30a6c2270 /main
parente57defa8dd849056f109d2938d1ec17bb5c3dd9e (diff)
parent7d86979ea094997639f73efe05316277bd6e466c (diff)
Merge topic 'update_taskprocessor_commands'
* changes: taskprocessor.c: Fix CLI "core show taskprocessors" unref. taskprocessor.c: Add CLI "core ping taskprocessor" missing unlock.
Diffstat (limited to 'main')
-rw-r--r--main/taskprocessor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/taskprocessor.c b/main/taskprocessor.c
index dfead22ab..9a880a654 100644
--- a/main/taskprocessor.c
+++ b/main/taskprocessor.c
@@ -399,6 +399,7 @@ static char *cli_tps_ping(struct ast_cli_entry *e, int cmd, struct ast_cli_args
ts.tv_nsec = when.tv_usec * 1000;
ast_mutex_lock(&cli_ping_cond_lock);
if (ast_taskprocessor_push(tps, tps_ping_handler, 0) < 0) {
+ ast_mutex_unlock(&cli_ping_cond_lock);
ast_cli(a->fd, "\nping failed: could not push task to %s\n\n", name);
ao2_ref(tps, -1);
return CLI_FAILURE;
@@ -444,7 +445,7 @@ static char *cli_tps_report(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
maxqsize = p->stats->max_qsize;
processed = p->stats->_tasks_processed_count;
ast_cli(a->fd, "\n%24s %17lu %12lu %12lu", name, processed, qsize, maxqsize);
- ao2_ref(p, -1);
+ ast_taskprocessor_unreference(p);
}
ao2_iterator_destroy(&i);
tcount = ao2_container_count(tps_singletons);