o Fix a possible free(NULL) when freeing an event_base with no signals.
o Add a flag to disable checking environment varibles when making an event_base
o Disallow setting less than 1 priority.
+ o Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen]
Changes in 2.0.1-alpha:
o free minheap on event_base_free(); from Christopher Layne
{
if(((unsigned int)-1) != e->min_heap_idx)
{
- min_heap_shift_down_(s, e->min_heap_idx, s->p[--s->n]);
+ struct event *last = s->p[--s->n];
+ unsigned parent = (e->min_heap_idx - 1) / 2;
+ /* we replace e with the last element in the heap. We might need to
+ shift it upward if it is less than its parent, or downward if it is
+ greater than one or both its children. Since the children are known
+ to be less than the parent, it can't need to shift both up and
+ down. */
+ if (e->min_heap_idx > 0 && min_heap_elem_greater(s->p[parent], last))
+ min_heap_shift_up_(s, e->min_heap_idx, last);
+ else
+ min_heap_shift_down_(s, e->min_heap_idx, last);
e->min_heap_idx = -1;
return 0;
}