Commit c26796a5 authored by Pekka Pessi's avatar Pekka Pessi

su_timer.c: timers_remove() now set sut_heap_index to 0

Re-recorded 20070713164234-65a35-151a3dfd7f471cbb0c31bc19765f88cbc918a539

darcs-hash:20090128180113-db55f-b01ec726c4d5668c892beac62551060334ef354b.gz
parent 25d624e3
......@@ -225,7 +225,7 @@ su_timer_set0(su_timer_queue_t *timers,
return -1;
if (SU_TIMER_IS_SET(t))
timers_remove(timers[0], t->sut_heap_index)->sut_heap_index = 0;
timers_remove(timers[0], t->sut_heap_index);
t->sut_wakeup = wakeup;
t->sut_arg = arg;
......@@ -481,7 +481,7 @@ int su_timer_reset(su_timer_t *t)
return -1;
if (SU_TIMER_IS_SET(t))
timers_remove(timers[0], t->sut_heap_index)->sut_heap_index = 0;
timers_remove(timers[0], t->sut_heap_index);
t->sut_wakeup = NULL;
t->sut_arg = NULL;
......@@ -526,7 +526,7 @@ int su_timer_expire(su_timer_queue_t * const timers,
break;
}
timers_remove(timers[0], 1)->sut_heap_index = 0;
timers_remove(timers[0], 1);
f = t->sut_wakeup; t->sut_wakeup = NULL;
assert(f);
......@@ -609,7 +609,7 @@ int su_timer_reset_all(su_timer_queue_t *timers, su_task_r task)
if (su_task_cmp(task, t->sut_task))
continue;
timers_remove(timers[0], i)->sut_heap_index = 0;
timers_remove(timers[0], i);
su_free(NULL, t);
n++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment