mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +00:00
(trunk libevent) yes, more assertions for exiva
This commit is contained in:
parent
7062f7add3
commit
c8fc84b971
2 changed files with 10 additions and 0 deletions
1
third-party/libevent/event.c
vendored
1
third-party/libevent/event.c
vendored
|
@ -837,6 +837,7 @@ void
|
|||
event_active(struct event *ev, int res, short ncalls)
|
||||
{
|
||||
assert(ev != NULL);
|
||||
assert(ev->ev_base != NULL);
|
||||
assert(res != 0);
|
||||
|
||||
/* We get different kinds of events, add them together */
|
||||
|
|
9
third-party/libevent/kqueue.c
vendored
9
third-party/libevent/kqueue.c
vendored
|
@ -288,6 +288,8 @@ kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
|
|||
struct timespec ts, *ts_p = NULL;
|
||||
int i, res;
|
||||
|
||||
assert(base != NULL);
|
||||
|
||||
if (tv != NULL) {
|
||||
TIMEVAL_TO_TIMESPEC(tv, &ts);
|
||||
ts_p = &ts;
|
||||
|
@ -360,6 +362,10 @@ kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
|
|||
}
|
||||
} else {
|
||||
ev = (struct event *)events[i].udata;
|
||||
assert(ev != NULL);
|
||||
assert(ev->ev_pri == 0);
|
||||
assert(ev->base != NULL);
|
||||
assert(ev->base == base);
|
||||
|
||||
if (!(ev->ev_events & EV_PERSIST))
|
||||
ev->ev_flags &= ~EVLIST_X_KQINKERNEL;
|
||||
|
@ -519,6 +525,9 @@ kq_del(void *arg, struct event *ev)
|
|||
struct kevent kev, *kev_old;
|
||||
struct kqidx *kqidx;
|
||||
|
||||
assert(ev != NULL);
|
||||
assert(ev->ev_pri == 0);
|
||||
|
||||
changes_ok(kqop);
|
||||
if (!(ev->ev_flags & EVLIST_X_KQINKERNEL))
|
||||
return (0);
|
||||
|
|
Loading…
Reference in a new issue