From 0e0c24ad78020b3cf47f69632e2e88c20c0a7387 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Tue, 5 Jan 2016 16:54:06 -0600 Subject: taskprocessor.c: Add CLI "core ping taskprocessor" missing unlock. Change-Id: I78247e0faf978bf850b5ba4e9f4933ab3c59d17b --- main/taskprocessor.c | 1 + 1 file changed, 1 insertion(+) (limited to 'main') diff --git a/main/taskprocessor.c b/main/taskprocessor.c index 7c50089f2..0712a92ff 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; -- cgit v1.2.3 From 2c4b7502dedcc4358dd4f41cb23001f0fa4075d6 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Thu, 7 Jan 2016 21:07:49 -0600 Subject: taskprocessor.c: Fix CLI "core show taskprocessors" unref. Change-Id: I1d9f4e532caa6dfabe034745dd16d06134efdce5 --- main/taskprocessor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main') diff --git a/main/taskprocessor.c b/main/taskprocessor.c index 0712a92ff..5061f4795 100644 --- a/main/taskprocessor.c +++ b/main/taskprocessor.c @@ -445,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); -- cgit v1.2.3