2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

stream-tcp: Fix error message for failed TCP_NODELAY setting on Windows.

Reported-by: Gurucharan Shetty <gshetty@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <mestery@noironetworks.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
This commit is contained in:
Ben Pfaff
2014-03-27 10:04:55 -07:00
parent 25a7a1ca3f
commit b6c4da210d

View File

@@ -55,9 +55,11 @@ new_tcp_stream(const char *name, int fd, int connect_status,
retval = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof on);
if (retval) {
VLOG_ERR("%s: setsockopt(TCP_NODELAY): %s", name, ovs_strerror(errno));
int error = sock_errno();
VLOG_ERR("%s: setsockopt(TCP_NODELAY): %s",
name, sock_strerror(error));
close(fd);
return errno;
return error;
}
return new_fd_stream(name, fd, connect_status, streamp);