fix to util_sock.c

Jeremy Allison jeremy at
Mon Nov 13 18:36:47 GMT 2000

okuyamak at wrote:
> Why did to switch it back, instead of simply detecting Solaris 2.5?
> Didn't you think about read() being broken case?

Because we have never had any reports of read() being broken.
In this case, the simplest fix was to not use recv() and go back
to read(), as we knew this worked on all systems we have been
ported to (many).
> And HOW was it broken? Simply does not work?
> Or does not work on specific cases? Simply some of the flags was
> undefined?

Both. Just didn't work on Solaris, missing flags on other
UNIXes (that's not a problem of course, you just #define MSG_WAITALL
to be zero).

Once we tested the performance implications of the change
and found it made no measurable difference, we went with
the simplest working code using read().


Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list