[patch] KExtendedSocket and SO_REUSEADDR

Malte Starostik malte at kde.org
Fri Jan 3 00:09:43 GMT 2003


On Friday 03 January 2003 00:58, Zack Rusin wrote:
> On Tuesday 31 December 2002 08:39, Malte Starostik wrote:
> > Hi,
> >
> > as mentioned earlier, KExtendedSocket set SO_REUSEADDR too late,
> > effectively making it useless.
> > This one fixes it for me makes it possible to call
> > setAddressReusable() before calling listen(), the only problem I see
> > is that the return value doesn't represent success of setsockopt()
> > anymore.
> > Okay to apply to both HEAD and bru^Hanch?
>
> Looks good. Just one question : why is the "on" parameter casted to
> char* ? SO_REUSEADDR takes an int, and the size of the int is passed as
> the optlen, so why cast it?

No idea, just moved that part around. I'll remove the two casts - one of my 
hobbies :-)

-Malte




More information about the kde-core-devel mailing list