mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 20:41:27 -04:00
Detect and reject n_priorities less than 1.
svn:r1222
This commit is contained in:
parent
01bda2b8fa
commit
253151c54c
@ -3,6 +3,7 @@ Changes in 2.0.2-alpha:
|
|||||||
o Make evdns functionality locked, and automatically defer dns callbacks.
|
o Make evdns functionality locked, and automatically defer dns callbacks.
|
||||||
o Fix a possible free(NULL) when freeing an event_base with no signals.
|
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 Add a flag to disable checking environment varibles when making an event_base
|
||||||
|
o Disallow setting less than 1 priority.
|
||||||
|
|
||||||
Changes in 2.0.1-alpha:
|
Changes in 2.0.1-alpha:
|
||||||
o free minheap on event_base_free(); from Christopher Layne
|
o free minheap on event_base_free(); from Christopher Layne
|
||||||
|
2
event.c
2
event.c
@ -548,7 +548,7 @@ event_base_priority_init(struct event_base *base, int npriorities)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (base->event_count_active)
|
if (base->event_count_active || npriorities < 1)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if (npriorities == base->nactivequeues)
|
if (npriorities == base->nactivequeues)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user