From 0e6ea63318fe28e058f9968b8be7e22ba6704adc Mon Sep 17 00:00:00 2001 From: jlemon Date: Fri, 2 Mar 2001 19:29:53 +0000 Subject: Only pick up so_error the first time through with EISCONN, as advertised. The sense of the test was reversed, so we were returning EISCONN, then 0. Pointed out and tested by: Martin Blapp --- sys/compat/linux/linux_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_socket.c') diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 079d5dd..e47c725 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -423,7 +423,7 @@ linux_connect(struct proc *p, struct linux_connect_args *args) error = EISCONN; if (fp->f_flag & FNONBLOCK) { so = (struct socket *)fp->f_data; - if ((u_int)so->so_emuldata != 0) + if ((u_int)so->so_emuldata == 0) error = so->so_error; so->so_emuldata = (void *)1; } -- cgit v1.1