taskprocessor.c: Add CLI "core ping taskprocessor" missing unlock.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 5 Jan 2016 22:54:06 +0000 (16:54 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Sat, 9 Jan 2016 03:05:16 +0000 (21:05 -0600)
Change-Id: I78247e0faf978bf850b5ba4e9f4933ab3c59d17b

main/taskprocessor.c

index dfead22..bea65a1 100644 (file)
@@ -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) {
        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;
                ast_cli(a->fd, "\nping failed: could not push task to %s\n\n", name);
                ao2_ref(tps, -1);
                return CLI_FAILURE;