]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
taskprocessor.c: Fix endless loop in CLI "core show taskprocessor" 33/2033/1
authorRichard Mudgett <rmudgett@digium.com>
Mon, 18 Jan 2016 22:38:12 +0000 (16:38 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 18 Jan 2016 22:54:26 +0000 (16:54 -0600)
Revert 48dd99d2b4d6938b528f9f6aca98d36b60c5513b which caused an infinite
loop only in v11.

ASTERISK-25701 #close
Reported by: ibercom

Change-Id: I0d9103f4dc03fa31bb8d5e7a7a73b467bbac5349

main/taskprocessor.c

index 29abebe2833f7e7e27a83f3164dafec4561837e6..99ad801c6c0b84bd85fde69fd09a6d799263b8d6 100644 (file)
@@ -284,7 +284,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);
-               ast_taskprocessor_unreference(p);
+               ao2_ref(p, -1);
        }
        ao2_iterator_destroy(&i);
        tcount = ao2_container_count(tps_singletons);