summaryrefslogtreecommitdiff
path: root/src/tcp_wrap.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-08-31 01:53:01 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-08-31 01:53:30 -0700
commit21cc4c4985fdf40cc128cd88cfdc02fd49e33b26 (patch)
treefbda524d1b1a9f12b6b271574ac3383d27eacb7e /src/tcp_wrap.cc
parent6f606838025c4e87701f360135f1ae72e968dc4c (diff)
downloadnode-new-21cc4c4985fdf40cc128cd88cfdc02fd49e33b26.tar.gz
Upgrade libuv to ea4271f
Required adding uv_default_loop() in many places.
Diffstat (limited to 'src/tcp_wrap.cc')
-rw-r--r--src/tcp_wrap.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc
index 6291964de6..64be382475 100644
--- a/src/tcp_wrap.cc
+++ b/src/tcp_wrap.cc
@@ -108,7 +108,7 @@ class TCPWrap : public StreamWrap {
TCPWrap(Handle<Object> object) : StreamWrap(object,
(uv_stream_t*) &handle_) {
- int r = uv_tcp_init(&handle_);
+ int r = uv_tcp_init(uv_default_loop(), &handle_);
assert(r == 0); // How do we proxy this error up to javascript?
// Suggestion: uv_tcp_init() returns void.
UpdateWriteQueueSize();
@@ -134,7 +134,7 @@ class TCPWrap : public StreamWrap {
Local<Object> sockname = Object::New();
if (r != 0) {
- SetErrno(uv_last_error().code);
+ SetErrno(uv_last_error(uv_default_loop()).code);
} else {
family = address.sa_family;
if (family == AF_INET) {
@@ -169,7 +169,7 @@ class TCPWrap : public StreamWrap {
int r = uv_tcp_bind(&wrap->handle_, address);
// Error starting the tcp.
- if (r) SetErrno(uv_last_error().code);
+ if (r) SetErrno(uv_last_error(uv_default_loop()).code);
return scope.Close(Integer::New(r));
}
@@ -186,7 +186,7 @@ class TCPWrap : public StreamWrap {
int r = uv_tcp_bind6(&wrap->handle_, address);
// Error starting the tcp.
- if (r) SetErrno(uv_last_error().code);
+ if (r) SetErrno(uv_last_error(uv_default_loop()).code);
return scope.Close(Integer::New(r));
}
@@ -201,7 +201,7 @@ class TCPWrap : public StreamWrap {
int r = uv_listen((uv_stream_t*)&wrap->handle_, backlog, OnConnection);
// Error starting the tcp.
- if (r) SetErrno(uv_last_error().code);
+ if (r) SetErrno(uv_last_error(uv_default_loop()).code);
return scope.Close(Integer::New(r));
}
@@ -235,7 +235,7 @@ class TCPWrap : public StreamWrap {
// Successful accept. Call the onconnection callback in JavaScript land.
argv[0] = client_obj;
} else {
- SetErrno(uv_last_error().code);
+ SetErrno(uv_last_error(uv_default_loop()).code);
argv[0] = v8::Null();
}
@@ -253,7 +253,7 @@ class TCPWrap : public StreamWrap {
assert(wrap->object_.IsEmpty() == false);
if (status) {
- SetErrno(uv_last_error().code);
+ SetErrno(uv_last_error(uv_default_loop()).code);
}
Local<Value> argv[3] = {
@@ -288,7 +288,7 @@ class TCPWrap : public StreamWrap {
req_wrap->Dispatched();
if (r) {
- SetErrno(uv_last_error().code);
+ SetErrno(uv_last_error(uv_default_loop()).code);
delete req_wrap;
return scope.Close(v8::Null());
} else {
@@ -314,7 +314,7 @@ class TCPWrap : public StreamWrap {
req_wrap->Dispatched();
if (r) {
- SetErrno(uv_last_error().code);
+ SetErrno(uv_last_error(uv_default_loop()).code);
delete req_wrap;
return scope.Close(v8::Null());
} else {