Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-02-23 17:24:18 +0300
committerCorinna Vinschen <corinna@vinschen.de>2018-02-23 17:24:18 +0300
commitb79018ee3a36140a82e2dfa2d7a71fc0bf15d892 (patch)
tree51ad539dac58c4d7cdc059222cedeb02634daa0e /winsup/cygwin/net.cc
parentcc9fe2c71651bf0d88e549d58656194860f5497e (diff)
Cygwin: encapsulate Winsock based fhandler_socket classes
Insert another class fhandler_socket_wsock between fhandler_socket and fhandler_socket_inet/fhandler_socket_local. Also, add a new method fhandler::is_wsock_socket to allow asking for sockets in general (is_socket) vs. Winsock-based sockets (is_wsock_socket). This allows to develop a new handler_socket_unix class as derived class from fhandler_socket without any trace of wsock code left in fhandler_socket. While this is basically a temporary measure at this time, it may prove useful for later interoperability with the upcoming Windows 10 AF_UNIX implementation at one point. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 6b88f9105..fe6576dc9 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -1384,8 +1384,7 @@ cygwin_getpeername (int fd, struct sockaddr *name, socklen_t *len)
}
__except (EFAULT) {}
__endtry
- syscall_printf ("%R = getpeername(%d) %p", res, fd,
- (fh ? fh->get_socket () : (SOCKET) -1));
+ syscall_printf ("%R = getpeername(%d)", res, fd);
return res;
}