summaryrefslogtreecommitdiff
path: root/deps/uv/src/unix/pipe.c
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-05-17 07:13:29 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-05-22 16:14:24 +0200
commit039fac633eaf081a96bb1ed8bc7307d03dcbe9d9 (patch)
treeb24085e8aab84e09ed8fd7d311cd360dbfd6259e /deps/uv/src/unix/pipe.c
parenta608f65b2454a83f08a60ba24088a672097540f5 (diff)
downloadandroid-node-v8-039fac633eaf081a96bb1ed8bc7307d03dcbe9d9.tar.gz
android-node-v8-039fac633eaf081a96bb1ed8bc7307d03dcbe9d9.tar.bz2
android-node-v8-039fac633eaf081a96bb1ed8bc7307d03dcbe9d9.zip
deps: upgrade libuv to a478847
The event loop's reference counting scheme in this version of libuv has changed. Update the libuv bindings to reflect that fact.
Diffstat (limited to 'deps/uv/src/unix/pipe.c')
-rw-r--r--deps/uv/src/unix/pipe.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/deps/uv/src/unix/pipe.c b/deps/uv/src/unix/pipe.c
index 7d0b2ec70b..91afb0811e 100644
--- a/deps/uv/src/unix/pipe.c
+++ b/deps/uv/src/unix/pipe.c
@@ -33,6 +33,8 @@
int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) {
uv__stream_init(loop, (uv_stream_t*)handle, UV_NAMED_PIPE);
loop->counters.pipe_init++;
+ handle->shutdown_req = NULL;
+ handle->connect_req = NULL;
handle->pipe_fname = NULL;
handle->ipc = ipc;
return 0;
@@ -163,7 +165,9 @@ void uv__pipe_close(uv_pipe_t* handle) {
void uv_pipe_open(uv_pipe_t* handle, uv_file fd) {
- uv__stream_open((uv_stream_t*)handle, fd, UV_READABLE | UV_WRITABLE);
+ uv__stream_open((uv_stream_t*)handle,
+ fd,
+ UV_STREAM_READABLE | UV_STREAM_WRITABLE);
}
@@ -204,24 +208,24 @@ void uv_pipe_connect(uv_connect_t* req,
goto out;
}
- uv__stream_open((uv_stream_t*)handle, sockfd, UV_READABLE | UV_WRITABLE);
-
+ uv__stream_open((uv_stream_t*)handle,
+ sockfd,
+ UV_STREAM_READABLE | UV_STREAM_WRITABLE);
ev_io_start(handle->loop->ev, &handle->read_watcher);
ev_io_start(handle->loop->ev, &handle->write_watcher);
-
status = 0;
out:
handle->delayed_error = status; /* Passed to callback. */
handle->connect_req = req;
+
+ uv__req_init(handle->loop, req, UV_CONNECT);
req->handle = (uv_stream_t*)handle;
- req->type = UV_CONNECT;
req->cb = cb;
ngx_queue_init(&req->queue);
/* Run callback on next tick. */
- ev_feed_event(handle->loop->ev, &handle->read_watcher, EV_CUSTOM);
- assert(ev_is_pending(&handle->read_watcher));
+ uv__make_pending(handle);
/* Mimic the Windows pipe implementation, always
* return 0 and let the callback handle errors.