o Support sendfile on Solaris: patch from Caitlin Mercer.
o New functions to explicitly reference a socket used by an evhttp object. Patches from David Reiss.
o When we send a BEV_EVENT_CONNECTED to indicate connected status, we no longer invoke the write callback as well unless we actually wrote data too.
-
+ o If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov.
Changes in 2.0.2-alpha:
o Add a new flag to bufferevents to make all callbacks automatically deferred.
#if defined(FIONREAD)
#ifdef WIN32
- if (ioctlsocket(fd, FIONREAD, &lng) == -1 || (n=lng) == 0) {
+ if (ioctlsocket(fd, FIONREAD, &lng) == -1 || (n=lng) <= 0) {
#else
- if (ioctl(fd, FIONREAD, &n) == -1 || n == 0) {
+ if (ioctl(fd, FIONREAD, &n) == -1 || n <= 0) {
#endif
n = EVBUFFER_MAX_READ;
} else if (n > EVBUFFER_MAX_READ && n > howmuch) {