Repository: qpid-dispatch Updated Branches: refs/heads/master fda49e973 -> 3ad1011f2
DISPATCH-1103 - Additional fix to qdr_core_timer_cancel_CT. Remove timer from scheduled_timers in all cases Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/3ad1011f Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/3ad1011f Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/3ad1011f Branch: refs/heads/master Commit: 3ad1011f2ee67ef7aed47b90b3922e386871b722 Parents: fda49e9 Author: Ganesh Murthy <[email protected]> Authored: Wed Sep 5 12:28:04 2018 -0400 Committer: Ganesh Murthy <[email protected]> Committed: Wed Sep 5 12:28:04 2018 -0400 ---------------------------------------------------------------------- src/router_core/core_timer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3ad1011f/src/router_core/core_timer.c ---------------------------------------------------------------------- diff --git a/src/router_core/core_timer.c b/src/router_core/core_timer.c index 156fe2c..a20cd64 100644 --- a/src/router_core/core_timer.c +++ b/src/router_core/core_timer.c @@ -84,10 +84,12 @@ void qdr_core_timer_schedule_CT(qdr_core_t *core, qdr_core_timer_t *timer, uint3 void qdr_core_timer_cancel_CT(qdr_core_t *core, qdr_core_timer_t *timer) { - if (timer->scheduled && DEQ_NEXT(timer)) { - DEQ_NEXT(timer)->delta_time_seconds += timer->delta_time_seconds; - DEQ_REMOVE(core->scheduled_timers, timer); + if (timer->scheduled) { timer->scheduled = false; + if (DEQ_NEXT(timer)) { + DEQ_NEXT(timer)->delta_time_seconds += timer->delta_time_seconds; + } + DEQ_REMOVE(core->scheduled_timers, timer); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
