You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2018/09/05 16:28:23 UTC

qpid-dispatch git commit: DISPATCH-1103 - Additional fix to qdr_core_timer_cancel_CT. Remove timer from scheduled_timers in all cases

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 <gm...@redhat.com>
Authored: Wed Sep 5 12:28:04 2018 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
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: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org