Commit e2642f0a880dcee81114c1c25766f0380672ee30

Nick Mathewson 2010-02-23T15:14:57

Fix some race conditions in persistent events and event_reinit I found these by adding an EVENT_BASE_ASSERT_LOCKED() call to most of the functions in event.c that can only be called while holding the lock. event_reinit() never grabbed the lock, but it needed to. event_persist_closure accessed the base to call event_add_internal() and gettime() when its caller had already dropped the lock. event_pending() called gettime() without grabbing the lock.