o added two additional libraries: libevent_core and libevent_extra in addition to the regular libevent. libevent_core contains only the event core whereas libevent_extra contains dns, http and rpc support
o Begin using libtool's library versioning support correctly. If we don't mess up, this will more or less guarantee binaries linked against old versions of libevent continue working when we make changes to libevent that do not break backward compatibility.
o Fix evhttp.h compilation when TAILQ_ENTRY is not defined.
+ o Small code cleanups in epoll_dispatch().
event_debug(("%s: epoll_wait reports %d", __func__, res));
for (i = 0; i < res; i++) {
- int which = 0;
int what = events[i].events;
struct event *evread = NULL, *evwrite = NULL;
evep = (struct evepoll *)events[i].data.ptr;
-
- if (what & EPOLLHUP)
- what |= EPOLLIN | EPOLLOUT;
- else if (what & EPOLLERR)
- what |= EPOLLIN | EPOLLOUT;
-
- if (what & EPOLLIN) {
- evread = evep->evread;
- which |= EV_READ;
- }
- if (what & EPOLLOUT) {
- evwrite = evep->evwrite;
- which |= EV_WRITE;
+ if (what & (EPOLLHUP|EPOLLERR)) {
+ evread = &evep->evread;
+ evwrite = &evep->evwrite;
+ } else {
+ if (what & EPOLLIN) {
+ evread = evep->evread;
+ }
+
+ if (what & EPOLLOUT) {
+ evwrite = evep->evwrite;
+ }
}
- if (!which)
+ if (!(evread||evwrite))
continue;
if (evread != NULL && !(evread->ev_events & EV_PERSIST))
event_del(evread);
if (evwrite != NULL && evwrite != evread &&
- !(evwrite->ev_events & EV_PERSIST))
+ !(evwrite->ev_events & EV_PERSIST))
event_del(evwrite);
if (evread != NULL)