On Wed, Feb 28, 2001 at 01:55:15AM +0100, Thomas Moestl wrote:
> On Wed, Feb 28, 2001 at 01:17:12AM +0100, Martin Blapp wrote:
> > Thomas Moestl and I tried to fix linux_connect. Most of this patch
> > is from Thomas Moestl. I did only a little part of it and testing.
> >
> > Staroffice5.2 has been broken about one year now, and it needs
> > a fix with the same behaviour to work correctly with FreeBSD.
> >
> > This patch should be rewritten so it can be comitted to CURRENT
> > and (IMPORTANT) to STABLE before 4.3 is out.
> >
> > + /*
> > + * Ugly kluge: some applications depend on 0 being
> > + * returned only the first time. Therefore, we set
> > + * the (otherwise invisible) SO_KNBCONN flag.
> > + * If it is set, return EISCONN.
> > + */
> > + error = holdsock(p->p_fd, linux_args.s, &fp);
> > + if (error)
> > + return (error);
> > + iconn = ((struct socket *)fp->f_data)->so_options &
> > + SO_KNBCONN;
> > + ((struct socket *)fp->f_data)->so_options |= SO_KNBCONN;
> > + fdrop(fp, p);
> > +
> > + if (iconn)
> > + return (EISCONN);
I have forgotten to add that if we fiddle with the socket's internals
anyway, this should probably be put into the socket state.
This really is a quick hack, but maybe it can be sanitized to be
useful.
- thomas
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message