Skip to content

Commit

Permalink
uv: upgrade to b328e4c
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Aug 10, 2011
1 parent c4549b8 commit e62cdd0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions deps/uv/src/uv-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,20 +331,20 @@ static int uv__bind(uv_tcp_t* tcp, int domain, struct sockaddr* addr,
int addrsize) {
int saved_errno;
int status;
int fd;

saved_errno = errno;
status = -1;

if (tcp->fd <= 0) {
if ((fd = uv__socket(domain, SOCK_STREAM, 0)) == -1) {
if (tcp->fd < 0) {
if ((tcp->fd = uv__socket(domain, SOCK_STREAM, 0)) == -1) {
uv_err_new((uv_handle_t*)tcp, errno);
goto out;
}

if (uv__stream_open((uv_stream_t*)tcp, fd, UV_READABLE | UV_WRITABLE)) {
if (uv__stream_open((uv_stream_t*)tcp, tcp->fd, UV_READABLE | UV_WRITABLE)) {
uv__close(tcp->fd);
tcp->fd = -1;
status = -2;
uv__close(fd);
goto out;
}
}
Expand Down Expand Up @@ -515,21 +515,21 @@ int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) {

static int uv_tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb) {
int r;
int fd;

if (tcp->delayed_error) {
uv_err_new((uv_handle_t*)tcp, tcp->delayed_error);
return -1;
}

if (tcp->fd <= 0) {
if ((fd = uv__socket(AF_INET, SOCK_STREAM, 0)) == -1) {
if (tcp->fd < 0) {
if ((tcp->fd = uv__socket(AF_INET, SOCK_STREAM, 0)) == -1) {
uv_err_new((uv_handle_t*)tcp, errno);
return -1;
}

if (uv__stream_open((uv_stream_t*)tcp, fd, UV_READABLE)) {
uv__close(fd);
if (uv__stream_open((uv_stream_t*)tcp, tcp->fd, UV_READABLE)) {
uv__close(tcp->fd);
tcp->fd = -1;
return -1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/src/win/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ typedef struct env_var {
int value_len;
} env_var_t;

#define E_V(str) { str "=", L"" str, sizeof(str), 0, 0 }
#define E_V(str) { str "=", L##str, sizeof(str), 0, 0 }

#define UTF8_TO_UTF16(s, t) \
size = uv_utf8_to_utf16(s, NULL, 0) * sizeof(wchar_t); \
Expand Down

0 comments on commit e62cdd0

Please sign in to comment.