Make event_base_getnpriorities work with old "implicit base" code

This commit is contained in:
Nick Mathewson 2012-05-09 10:49:28 -04:00
parent bd395549a3
commit c46cb9c3a2

View File

@ -1129,6 +1129,9 @@ event_base_get_npriorities(struct event_base *base)
{
int n;
if (base == NULL)
base = current_base;
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
n = base->nactivequeues;
EVBASE_RELEASE_LOCK(base, th_base_lock);