diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-06-27 16:54:53 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-06-27 16:54:53 +0000 |
commit | 6ca8bcf939d48f7c9fb1cf965f45a62f70a841d5 (patch) | |
tree | 71dd26f6d218052d78a3b11d517531dd66576300 /ace | |
parent | 1e290d61bc8d5f2ba135d72959c52d48c33b7892 (diff) | |
download | ATCD-6ca8bcf939d48f7c9fb1cf965f45a62f70a841d5.tar.gz |
Added a check for an empty queue in expire.
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Timer_Queue_T.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ace/Timer_Queue_T.cpp b/ace/Timer_Queue_T.cpp index b959ccdda90..15f22302584 100644 --- a/ace/Timer_Queue_T.cpp +++ b/ace/Timer_Queue_T.cpp @@ -192,6 +192,9 @@ ACE_Timer_Queue_T<TYPE, FUNCTOR, LOCK>::expire (const ACE_Time_Value &cur_time) // Keep looping while there are timers remaining and the earliest // timer is <= the <cur_time> passed in to the method. + if (this->is_empty ()) + return 0; + while (this->earliest_time () <= cur_time) { expired = this->remove_first (); @@ -232,8 +235,8 @@ ACE_Timer_Queue_T<TYPE, FUNCTOR, LOCK>::expire (const ACE_Time_Value &cur_time) template <class LOCK> int ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>::timeout (ACE_Timer_Queue_T<ACE_Event_Handler *, - ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>, - LOCK> &timer_queue, + ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>, + LOCK> &timer_queue, ACE_Event_Handler *handler, const void *act, const ACE_Time_Value &cur_time) @@ -247,8 +250,8 @@ ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>::timeout (ACE_Timer_Queue_T<ACE_Ev template <class LOCK> int ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>::cancellation (ACE_Timer_Queue_T<ACE_Event_Handler *, - ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>, - LOCK> &timer_queue, + ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>, + LOCK> &timer_queue, ACE_Event_Handler *handler) { ACE_UNUSED_ARG (timer_queue); @@ -261,8 +264,8 @@ ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>::cancellation (ACE_Timer_Queue_T<A template <class LOCK> int ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>::deletion (ACE_Timer_Queue_T<ACE_Event_Handler *, - ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>, - LOCK> &timer_queue, + ACE_Event_Handler_Handle_Timeout_Upcall<LOCK>, + LOCK> &timer_queue, ACE_Event_Handler *handler, const void *arg) { |