From 5fd2c406f1a990f5f4c081b92d3108a0c999848e Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 23 May 2012 22:19:11 +0200 Subject: [PATCH] unix: fix up asserts in core.c and stream.c --- src/unix/core.c | 4 ++-- src/unix/stream.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/unix/core.c b/src/unix/core.c index 8236c4c1..39292634 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -268,8 +268,8 @@ void uv__finish_close(uv_handle_t* handle) { case UV_NAMED_PIPE: case UV_TCP: case UV_TTY: - assert(!ev_is_active(&((uv_stream_t*)handle)->read_watcher)); - assert(!ev_is_active(&((uv_stream_t*)handle)->write_watcher)); + assert(!uv__io_active(&((uv_stream_t*)handle)->read_watcher)); + assert(!uv__io_active(&((uv_stream_t*)handle)->write_watcher)); assert(((uv_stream_t*)handle)->fd == -1); uv__stream_destroy((uv_stream_t*)handle); break; diff --git a/src/unix/stream.c b/src/unix/stream.c index f441c9b9..bb5351a4 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -626,7 +626,7 @@ static void uv__read(uv_stream_t* stream) { stream->read2_cb((uv_pipe_t*)stream, -1, buf, UV_UNKNOWN_HANDLE); } - assert(!ev_is_active(&stream->read_watcher)); + assert(!uv__io_active(&stream->read_watcher)); return; } @@ -634,7 +634,7 @@ static void uv__read(uv_stream_t* stream) { /* EOF */ uv__set_artificial_error(stream->loop, UV_EOF); uv__io_stop(stream->loop, &stream->read_watcher); - if (!ev_is_active(&stream->write_watcher)) + if (!uv__io_active(&stream->write_watcher)) uv__handle_stop(stream); if (stream->read_cb) { @@ -1027,6 +1027,6 @@ void uv__stream_close(uv_stream_t* handle) { handle->accepted_fd = -1; } - assert(!ev_is_active(&handle->read_watcher)); - assert(!ev_is_active(&handle->write_watcher)); + assert(!uv__io_active(&handle->read_watcher)); + assert(!uv__io_active(&handle->write_watcher)); }