diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-03-02 19:29:53 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-03-02 19:29:53 +0000 |
commit | 0e6ea63318fe28e058f9968b8be7e22ba6704adc (patch) | |
tree | 47218f49c5ed481abd1581c6e290e66f5d81f705 /sys/compat/linux/linux_socket.c | |
parent | 3e8d7346e8d524380230b24dff5cb01becde964b (diff) | |
download | FreeBSD-src-0e6ea63318fe28e058f9968b8be7e22ba6704adc.zip FreeBSD-src-0e6ea63318fe28e058f9968b8be7e22ba6704adc.tar.gz |
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 <mb@imp.ch>
Diffstat (limited to 'sys/compat/linux/linux_socket.c')
-rw-r--r-- | sys/compat/linux/linux_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |