diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-24 16:39:59 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-24 16:39:59 +0000 |
commit | 35e40e117fd23ad3777232f65a4df37628565b91 (patch) | |
tree | 0e74b258c064e867630b1f3a92cc21ac5583209e /ace/Timer_Heap_T.cpp | |
parent | cbafd64a002515696066817a3707210e35c38305 (diff) | |
download | ATCD-35e40e117fd23ad3777232f65a4df37628565b91.tar.gz |
Fixed free list corruption with reschedule
Diffstat (limited to 'ace/Timer_Heap_T.cpp')
-rw-r--r-- | ace/Timer_Heap_T.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ace/Timer_Heap_T.cpp b/ace/Timer_Heap_T.cpp index 48708f8875a..c2087075f4f 100644 --- a/ace/Timer_Heap_T.cpp +++ b/ace/Timer_Heap_T.cpp @@ -448,6 +448,15 @@ ACE_Timer_Heap_T<TYPE, FUNCTOR, LOCK>::reschedule (ACE_Timer_Node_T<TYPE> *expir { ACE_TRACE ("ACE_Timer_Heap::reschedule"); + // From James Crawford <jamesc@in.ot.com.au> + // If we are rescheduling then we have freed our timer id so we need + // to reacquire it. + // NOTE: we rely on the fact that we will get the same timer id we just + // freed. + int timerId = this->timer_id (); + + ACE_ASSERT(timerId == expired->get_timer_id ()); // Just to be safe... + // Restore the heap property. this->insert (expired); } |