diff --git a/AUTHORS b/AUTHORS index 4d56a3b0..a9c63bf6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -97,3 +97,5 @@ Luca Bruno Reini Urban Maks Naumov Sean Farrell +Chris Bank +Geert Jansen diff --git a/ChangeLog b/ChangeLog index ad61b5f1..e0213369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2013.11.13, Version 0.10.19 (Stable), 33959f7524090b8d2c6c41e2400ca77e31755059 + +Changes since version 0.10.18: + +* darwin: avoid calling GetCurrentProcess (Fedor Indutny) + +* unix: update events from pevents between polls (Fedor Indutny) + +* fsevents: support japaneese characters in path (Chris Bank) + +* linux: don't turn on SO_REUSEPORT socket option (Ben Noordhuis) + +* build: fix windows smp build with gyp (Geert Jansen) + +* linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT (Ben Noordhuis) + +* unix: fix reopened fd bug (Fedor Indutny) + +* core: fix fake watcher list and count preservation (Fedor Indutny) + + 2013.10.30, Version 0.11.14 (Unstable), d7a6482f45c1b4eb4a853dbe1a9ce8090a35633a Changes since version 0.11.13: diff --git a/src/unix/darwin.c b/src/unix/darwin.c index 74d34f50..c1655994 100644 --- a/src/unix/darwin.c +++ b/src/unix/darwin.c @@ -52,25 +52,6 @@ void uv__platform_loop_delete(uv_loop_t* loop) { } -void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) { - struct kevent* events; - uintptr_t i; - uintptr_t nfds; - - assert(loop->watchers != NULL); - - events = (struct kevent*) loop->watchers[loop->nwatchers]; - nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; - if (events == NULL) - return; - - /* Invalidate events with same file descriptor */ - for (i = 0; i < nfds; i++) - if ((int) events[i].ident == fd) - events[i].ident = -1; -} - - uint64_t uv__hrtime(uv_clocktype_t type) { mach_timebase_info_data_t info; diff --git a/src/unix/kqueue.c b/src/unix/kqueue.c index 75119f56..70f5d9ed 100644 --- a/src/unix/kqueue.c +++ b/src/unix/kqueue.c @@ -263,6 +263,25 @@ update_timeout: } +void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) { + struct kevent* events; + uintptr_t i; + uintptr_t nfds; + + assert(loop->watchers != NULL); + + events = (struct kevent*) loop->watchers[loop->nwatchers]; + nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; + if (events == NULL) + return; + + /* Invalidate events with same file descriptor */ + for (i = 0; i < nfds; i++) + if ((int) events[i].ident == fd) + events[i].ident = -1; +} + + static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags) { uv_fs_event_t* handle; struct kevent ev; diff --git a/test/test-tcp-close-accept.c b/test/test-tcp-close-accept.c index f5336a58..240b8129 100644 --- a/test/test-tcp-close-accept.c +++ b/test/test-tcp-close-accept.c @@ -71,13 +71,13 @@ static void connect_cb(uv_connect_t* req, int status) { ASSERT(0 == uv_write(&write_reqs[i], outgoing, &buf, 1, write_cb)); } -static uv_buf_t alloc_cb(uv_handle_t* handle, size_t suggested_size) { - static char buf[1]; - - return uv_buf_init(buf, sizeof(buf)); +static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { + static char slab[1]; + buf->base = slab; + buf->len = sizeof(slab); } -static void read_cb(uv_stream_t* stream, ssize_t nread, uv_buf_t b) { +static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { uv_loop_t* loop; unsigned int i; @@ -95,7 +95,10 @@ static void read_cb(uv_stream_t* stream, ssize_t nread, uv_buf_t b) { /* Create new fd that should be one of the closed incomings */ ASSERT(0 == uv_tcp_init(loop, &tcp_check)); - ASSERT(0 == uv_tcp_connect(&tcp_check_req, &tcp_check, addr, connect_cb)); + ASSERT(0 == uv_tcp_connect(&tcp_check_req, + &tcp_check, + (const struct sockaddr*) &addr, + connect_cb)); ASSERT(0 == uv_read_start((uv_stream_t*) &tcp_check, alloc_cb, read_cb)); /* Close server, so no one will connect to it */ @@ -150,10 +153,10 @@ TEST_IMPL(tcp_close_accept) { */ loop = uv_default_loop(); - addr = uv_ip4_addr("0.0.0.0", TEST_PORT); + ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); ASSERT(0 == uv_tcp_init(loop, &tcp_server)); - ASSERT(0 == uv_tcp_bind(&tcp_server, addr)); + ASSERT(0 == uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr)); ASSERT(0 == uv_listen((uv_stream_t*) &tcp_server, ARRAY_SIZE(tcp_outgoing), connection_cb)); @@ -162,7 +165,10 @@ TEST_IMPL(tcp_close_accept) { client = tcp_outgoing + i; ASSERT(0 == uv_tcp_init(loop, client)); - ASSERT(0 == uv_tcp_connect(&connect_reqs[i], client, addr, connect_cb)); + ASSERT(0 == uv_tcp_connect(&connect_reqs[i], + client, + (const struct sockaddr*) &addr, + connect_cb)); } uv_run(loop, UV_RUN_DEFAULT);