summaryrefslogtreecommitdiff
path: root/deps/uv/src/unix/pipe.c
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-12-13 20:23:01 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2012-12-13 20:23:01 +0100
commit6cf68aead6886d397772ea176a9f5c35fdb63071 (patch)
treec9c650c69d13bb84000181b16834618069de4a79 /deps/uv/src/unix/pipe.c
parent0506d294dc5a51556e935a50a754aa7cbd7a7977 (diff)
downloadandroid-node-v8-6cf68aead6886d397772ea176a9f5c35fdb63071.tar.gz
android-node-v8-6cf68aead6886d397772ea176a9f5c35fdb63071.tar.bz2
android-node-v8-6cf68aead6886d397772ea176a9f5c35fdb63071.zip
deps: upgrade libuv to e079a99
Diffstat (limited to 'deps/uv/src/unix/pipe.c')
-rw-r--r--deps/uv/src/unix/pipe.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/deps/uv/src/unix/pipe.c b/deps/uv/src/unix/pipe.c
index f432f4539a..b28c8ef919 100644
--- a/deps/uv/src/unix/pipe.c
+++ b/deps/uv/src/unix/pipe.c
@@ -57,7 +57,7 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
bound = 0;
/* Already bound? */
- if (handle->io_watcher.fd >= 0) {
+ if (uv__stream_fd(handle) >= 0) {
uv__set_artificial_error(handle->loop, UV_EINVAL);
goto out;
}
@@ -117,13 +117,13 @@ int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) {
saved_errno = errno;
status = -1;
- if (handle->io_watcher.fd == -1) {
+ if (uv__stream_fd(handle) == -1) {
uv__set_artificial_error(handle->loop, UV_EINVAL);
goto out;
}
- assert(handle->io_watcher.fd >= 0);
+ assert(uv__stream_fd(handle) >= 0);
- if ((status = listen(handle->io_watcher.fd, backlog)) == -1) {
+ if ((status = listen(uv__stream_fd(handle), backlog)) == -1) {
uv__set_sys_error(handle->loop, errno);
} else {
handle->connection_cb = cb;
@@ -172,7 +172,7 @@ void uv_pipe_connect(uv_connect_t* req,
int r;
saved_errno = errno;
- new_sock = (handle->io_watcher.fd == -1);
+ new_sock = (uv__stream_fd(handle) == -1);
err = -1;
if (new_sock)
@@ -187,7 +187,8 @@ void uv_pipe_connect(uv_connect_t* req,
* is either there or not.
*/
do {
- r = connect(handle->io_watcher.fd, (struct sockaddr*)&saddr, sizeof saddr);
+ r = connect(uv__stream_fd(handle),
+ (struct sockaddr*)&saddr, sizeof saddr);
}
while (r == -1 && errno == EINTR);
@@ -196,7 +197,7 @@ void uv_pipe_connect(uv_connect_t* req,
if (new_sock)
if (uv__stream_open((uv_stream_t*)handle,
- handle->io_watcher.fd,
+ uv__stream_fd(handle),
UV_STREAM_READABLE | UV_STREAM_WRITABLE))
goto out;
@@ -233,7 +234,7 @@ static void uv__pipe_accept(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
assert(pipe->type == UV_NAMED_PIPE);
- sockfd = uv__accept(pipe->io_watcher.fd);
+ sockfd = uv__accept(uv__stream_fd(pipe));
if (sockfd == -1) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
uv__set_sys_error(pipe->loop, errno);