fix to util_sock.c

Jeremy Allison jeremy at valinux.com
Mon Nov 13 19:00:14 GMT 2000


okuyamak at dd.iij4u.or.jp wrote:
> 
> By the way, If buggy target is KNOWN, or if non-buggy target is
> KNOWN, then we can always switch it back to read() by used something
> like:
> 
> #ifdef HAVE_WORKING_RECV
> #define   RECV(a,b,c,d)  recv(a,b,c,d)
> #else
> #define RECV(a,b,c,d)   read(a,b,c)
> #endif
> 
> kind of macro.
> 
> And by defining HAVE_WORKING_RECV as default, we can always
> find one who's not working.

This is only worthwhile if we have evidence that changing to 
use recv() gives us an advantage (maybe performace) of some kind.

Otherwise, why change it ? It doesn't seem cleaner than read()
and it doesn't give a performace advantage that we can measure.

> # I experenced read() that did not work for socket more oftenly than
> # non working recv(), is the reason.

The experience of Samba on all the supported platforms
has been the reverse. Can you be specific on which platforms
read() on sockets is broken ? I have never come accros such
a platform.

Jeremy.

-- 
--------------------------------------------------------
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