git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
156f7a4
)
stream-tcp: Use closesocket instead of close for sockets.
author
Gurucharan Shetty
<gshetty@nicira.com>
Thu, 27 Mar 2014 23:39:35 +0000
(16:39 -0700)
committer
Gurucharan Shetty
<gshetty@nicira.com>
Fri, 28 Mar 2014 17:53:47 +0000
(10:53 -0700)
We should use closesocket() while closing sockets so that
closing sockets work fine on both POSIX and Windows.
(In POSIX, we #define closesocket close)
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/stream-tcp.c
patch
|
blob
|
history
diff --git
a/lib/stream-tcp.c
b/lib/stream-tcp.c
index
4cd4e6f
..
d62e9c3
100644
(file)
--- a/
lib/stream-tcp.c
+++ b/
lib/stream-tcp.c
@@
-58,7
+58,7
@@
new_tcp_stream(const char *name, int fd, int connect_status,
int error = sock_errno();
VLOG_ERR("%s: setsockopt(TCP_NODELAY): %s",
name, sock_strerror(error));
- close(fd);
+ close
socket
(fd);
return error;
}