Index: fhandler.h =================================================================== RCS file: /cvs/uberbaum/winsup/cygwin/fhandler.h,v retrieving revision 1.111 diff -u -p -2 -r1.111 fhandler.h --- fhandler.h 19 Mar 2002 04:39:01 -0000 1.111 +++ fhandler.h 10 Apr 2002 15:16:16 -0000 @@ -358,4 +358,5 @@ class fhandler_socket: public fhandler_b private: int addr_family; + int type; int connect_secret [4]; HANDLE secret_event; @@ -398,4 +399,6 @@ class fhandler_socket: public fhandler_b void set_addr_family (int af) {addr_family = af;} int get_addr_family () {return addr_family;} + void set_socket_type (int st) { type = st;} + int get_socket_type () {return type;} void set_sun_path (const char *path); char *get_sun_path () {return sun_path;} Index: net.cc =================================================================== RCS file: /cvs/uberbaum/winsup/cygwin/net.cc,v retrieving revision 1.105 diff -u -p -2 -r1.105 net.cc --- net.cc 15 Mar 2002 21:49:10 -0000 1.105 +++ net.cc 10 Apr 2002 15:16:16 -0000 @@ -519,4 +519,5 @@ cygwin_socket (int af, int type, int pro int res = -1; SOCKET soc = 0; + fhandler_socket* fh = NULL; cygheap_fdnew fd; @@ -540,5 +541,10 @@ cygwin_socket (int af, int type, int pro name = (type == SOCK_STREAM ? "/dev/streamsocket" : "/dev/dgsocket"); - fdsock (fd, name, soc)->set_addr_family (af); + fh = fdsock (fd, name, soc); + if (fh) + { + fh->set_addr_family (af); + fh->set_socket_type (type); + } res = fd; } @@ -882,5 +888,6 @@ cygwin_connect (int fd, set_winsock_errno (); } - if (sock->get_addr_family () == AF_LOCAL) + if (sock->get_addr_family () == AF_LOCAL && + sock->get_socket_type () == SOCK_STREAM) { if (!res || in_progress) @@ -1200,5 +1207,6 @@ cygwin_accept (int fd, struct sockaddr * in_progress = TRUE; - if (sock->get_addr_family () == AF_LOCAL) + if (sock->get_addr_family () == AF_LOCAL && + sock->get_socket_type () == SOCK_STREAM) { if ((SOCKET) res != (SOCKET) INVALID_SOCKET || in_progress)