diff options
author | Steve Davies <steve@one47.co.uk> | 2015-11-11 10:16:22 +0000 |
---|---|---|
committer | Steve Davies <steve@one47.co.uk> | 2015-11-12 11:44:17 +0000 |
commit | 07583c288828a496cd7730b55112128fea31eaef (patch) | |
tree | 0bd898dc3cb69e5befdf43ecfd5c4fcea0c82a82 /res/res_rtp_asterisk.c | |
parent | dac0bf063c756ce737aa84b246a7c4e6c317b696 (diff) |
Further fixes to improper usage of scheduler
When ASTERISK-25449 was closed, a number of scheduler issues mentioned in
the comments were missed. These have since beed raised in ASTERISK-25476
and elsewhere.
This patch attempts to collect all of the scheduler issues discovered so
far and address them sensibly.
ASTERISK-25476 #close
Change-Id: I87a77d581e2e0d91d33b4b2fbff80f64a566d05b
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r-- | res/res_rtp_asterisk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index e2062416e..f6bf34211 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -4780,7 +4780,7 @@ static void ast_rtp_prop_set(struct ast_rtp_instance *instance, enum ast_rtp_pro return; } else { if (rtp->rtcp) { - if (rtp->rtcp->schedid > 0) { + if (rtp->rtcp->schedid > -1) { if (!ast_sched_del(rtp->sched, rtp->rtcp->schedid)) { /* Successfully cancelled scheduler entry. */ ao2_ref(instance, -1); @@ -4997,7 +4997,7 @@ static void ast_rtp_stop(struct ast_rtp_instance *instance) } #endif - if (rtp->rtcp && rtp->rtcp->schedid > 0) { + if (rtp->rtcp && rtp->rtcp->schedid > -1) { if (!ast_sched_del(rtp->sched, rtp->rtcp->schedid)) { /* successfully cancelled scheduler entry. */ ao2_ref(instance, -1); |