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>
This commit is contained in:
parent
afcf05e46a
commit
358325bf4a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user