Detect and reject n_priorities less than 1.

svn:r1222
This commit is contained in:
Nick Mathewson 2009-04-22 20:28:30 +00:00
parent 01bda2b8fa
commit 253151c54c
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ Changes in 2.0.2-alpha:
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 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:
o free minheap on event_base_free(); from Christopher Layne

View File

@ -548,7 +548,7 @@ event_base_priority_init(struct event_base *base, int npriorities)
{
int i;
if (base->event_count_active)
if (base->event_count_active || npriorities < 1)
return (-1);
if (npriorities == base->nactivequeues)