* net.cc (cygwin_accept): Set socket type for accepted socket.

(socketpair): Set socket type for both sockets.

	From Egor Duda <deo@logos-m.ru>:

	* fhandler.h (class fhandler_socket): New member to store socket type.
	(fhandler_socket::get_socket_type): Access it.
	(fhandler_socket::set_socket_type): Ditto.
	* net.cc (cygwin_socket): Store socket type.
	(cygwin_connect): Disable security checks for connectionless sockets.
	(cygwin_accept): Ditto.
This commit is contained in:
Corinna Vinschen
2002-04-12 14:52:36 +00:00
parent fcd631cf70
commit 4deace13e4
3 changed files with 40 additions and 8 deletions

View File

@ -357,6 +357,7 @@ class fhandler_socket: public fhandler_base
{
private:
int addr_family;
int type;
int connect_secret [4];
HANDLE secret_event;
struct _WSAPROTOCOL_INFOA *prot_info_ptr;
@ -397,6 +398,8 @@ class fhandler_socket: public fhandler_base
select_record *select_except (select_record *s);
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;}
void set_connect_secret ();