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:46:43 +0000 |
commit | d982b99e71abd84cb668dfee23021422ffceed9a (patch) | |
tree | b6c12d409d976d3e574f10ffcef05b40bff07a26 /res/res_rtp_asterisk.c | |
parent | c1abe8906dd4696bc85697cfbbff2c9fca6af4d6 (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 8cd542767..ac83d734b 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -4779,7 +4779,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); @@ -4996,7 +4996,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); |